Kenix Posted March 13, 2012 Posted March 13, 2012 First parameter in event onPlayerWasted is total ammo count ( not element player ).
Moderators IIYAMA Posted March 13, 2012 Moderators Posted March 13, 2012 I get the feeling this script is stolen....
myyusuf Posted March 13, 2012 Author Posted March 13, 2012 (edited) I get the feeling this script is stolen.... no way. i just took xml connection from nextreme's userpanel. other things writted by me. also i am not good at lua. i started last week. so? can you help me please? Edited March 13, 2012 by Guest
GanJaRuleZ Posted March 13, 2012 Posted March 13, 2012 @@IIYAMA , please stop making these affirmations just for posts. ON : Try to replace these : local puan = tonumber ( loadPlayerData( player_Wasted, "points" ) ) or 0 Full code : function bastardDied( player_Wasted ) local rank = getPlayerRank( player_Wasted ) if (rank == 2) then local pointsToDie = 5 local playerPoints = tonumber">tonumber">tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints + pointsToDie ) outputChatBox ( "#c0c0c0* #abcdef"..string.gsub(getPlayerName (player_Wasted),"#%x%x%x%x%x%x","").." #c0c0c0has finished this round in second place and got #abcdef5 #c0c0c0points!", root, 255, 255, 255, true ) elseif(rank == 3) then local pointsToDie = 3 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) or 0 savePlayerData( player_Wasted, "points", playerPoints + pointsToDie ) outputChatBox ( "#c0c0c0* #abcdef"..string.gsub(getPlayerName (player_Wasted),"#%x%x%x%x%x%x","").." #c0c0c0has finished this round in third place and got #abcdef3 #c0c0c0points!", root, 255, 255, 255, true ) elseif(rank > 3 and rank < 31) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) or 0 savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) end end addEventHandler("onPlayerWasted", getRootElement(), bastardDied) Btw , loadPlayerData and savePlayerData are definied ? I doubt this.
myyusuf Posted March 13, 2012 Author Posted March 13, 2012 @@IIYAMA , please stop making these affirmations just for posts.ON : Try to replace these : local puan = tonumber ( loadPlayerData( player_Wasted, "points" ) ) or 0 Full code : function bastardDied( player_Wasted ) local rank = getPlayerRank( player_Wasted ) if (rank == 2) then local pointsToDie = 5 local playerPoints = tonumber">tonumber">tonumber ( loadPlayerData( player_Wasted, "points" ) ) savePlayerData( player_Wasted, "points", playerPoints + pointsToDie ) outputChatBox ( "#c0c0c0* #abcdef"..string.gsub(getPlayerName (player_Wasted),"#%x%x%x%x%x%x","").." #c0c0c0has finished this round in second place and got #abcdef5 #c0c0c0points!", root, 255, 255, 255, true ) elseif(rank == 3) then local pointsToDie = 3 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) or 0 savePlayerData( player_Wasted, "points", playerPoints + pointsToDie ) outputChatBox ( "#c0c0c0* #abcdef"..string.gsub(getPlayerName (player_Wasted),"#%x%x%x%x%x%x","").." #c0c0c0has finished this round in third place and got #abcdef3 #c0c0c0points!", root, 255, 255, 255, true ) elseif(rank > 3 and rank < 31) then local pointsToDie = 1 local playerPoints = tonumber ( loadPlayerData( player_Wasted, "points" ) ) or 0 savePlayerData( player_Wasted, "points", playerPoints - pointsToDie ) outputChatBox ( "#c0c0c0* #abcdefYou died and lost #abcdef1 #c0c0c0point!", player_wasted, 255, 255, 255, true ) end end addEventHandler("onPlayerWasted", getRootElement(), bastardDied) Btw , loadPlayerData and savePlayerData are definied ? I doubt this. different. when i use that local puan = tonumber ( loadPlayerData( player_Wasted, "points" ) ) or 0 it doesnt effect to "points".
GanJaRuleZ Posted March 13, 2012 Posted March 13, 2012 Actually it definies the player points ? o.0 If 'points' isn't definied , the script will automaticaly use '0' ..
Kenix Posted March 13, 2012 Posted March 13, 2012 First parameter in event onPlayerWasted is total ammo count ( not element player ). Read it please. player_Wasted is number and you want get data from number?
GanJaRuleZ Posted March 13, 2012 Posted March 13, 2012 Right , instead of function bastardDied( player_Wasted ) use function bastardDied() And replace each "player_wasted" with "source" ..
myyusuf Posted March 13, 2012 Author Posted March 13, 2012 First parameter in event onPlayerWasted is total ammo count ( not element player ). Read it please. player_Wasted is number and you want get data from number? oh. thanks dude. i am a idiot Right , instead of function bastardDied( player_Wasted ) use function bastardDied() And replace each "player_wasted" with "source" .. thank you for helping too
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now