Newbie Posted May 3, 2014 Posted May 3, 2014 function DestructionWin( ) local account = getPlayerAccount( source ) if account then local alivePlayers = getAlivePlayers( ) if #alivePlayers == 1 then local account = getPlayerAccount( alivePlayers[1] ) if account then if isGuestAccount( account ) then return end setAccountData( account,"Wins",tostring( getAccountData( account,"Wins" ) or 0 )+1 ) setAccountData( account,"Cash",tostring( getAccountData( account,"Cash" ) or 0 )+ 250 ) setAccountData( account,"EXP",tostring( getAccountData( account,"EXP" ) or 0 )+math.random(3,5) ) outputChatBox("#000000* #ffffffYou won! $#11dd11250 #FFFFFF", source, 255, 255, 255, true) end end end end I dont know why it doesnt work..
Newbie Posted May 3, 2014 Author Posted May 3, 2014 LoL.. Fixed it addEvent( 'onPlayerRaceWasted',true ) addEventHandler( "onPlayerRaceWasted", root,DestructionWin )
Karuzo Posted May 3, 2014 Posted May 3, 2014 remove "end" on line 16 Don't do that. Put an end after line 16. And try to tell us what /debugscript 3 says.
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