jeremaniak Posted April 29, 2012 Share Posted April 29, 2012 when i start race and i die so i am second place and my friend wins the race it says he gets the money but i get it please help me local activePlayers = getActivePlayers() if #activePlayers == 1 then self.rankingBoard:add(activePlayers[1], timePassed) showMessage(getPlayerName(activePlayers[1]) .. ' is the final survivor! and has won $3000', 0, 255, 0) givePlayerMoney ( source, 3000 ) triggerEvent ( "onPlayerDestructionDerbyWin", activePlayers [1] ) end end Link to comment
Guest Guest4401 Posted April 29, 2012 Share Posted April 29, 2012 Winner is the player left in the table activePlayers, not source (which is you). So, Change givePlayerMoney ( source, 3000 ) to givePlayerMoney ( activePlayers[1], 3000 ) 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