Kenix Posted March 13, 2012 Share Posted March 13, 2012 First parameter in event onPlayerWasted is total ammo count ( not element player ). Link to comment
Moderators IIYAMA Posted March 13, 2012 Moderators Share Posted March 13, 2012 I get the feeling this script is stolen.... Link to comment
myyusuf Posted March 13, 2012 Author Share 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 Link to comment
Moderators IIYAMA Posted March 13, 2012 Moderators Share Posted March 13, 2012 Well, did you do it? Link to comment
myyusuf Posted March 13, 2012 Author Share Posted March 13, 2012 Well, did you do it? yes. Link to comment
GanJaRuleZ Posted March 13, 2012 Share 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. Link to comment
myyusuf Posted March 13, 2012 Author Share 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". Link to comment
GanJaRuleZ Posted March 13, 2012 Share Posted March 13, 2012 Actually it definies the player points ? o.0 If 'points' isn't definied , the script will automaticaly use '0' .. Link to comment
Kenix Posted March 13, 2012 Share 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? Link to comment
GanJaRuleZ Posted March 13, 2012 Share Posted March 13, 2012 Right , instead of function bastardDied( player_Wasted ) use function bastardDied() And replace each "player_wasted" with "source" .. Link to comment
myyusuf Posted March 13, 2012 Author Share 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 Link to comment
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