Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function player_finish ( rank )
- if getPlayerCount () > 1 then
- if rank == 1 then
- money1 = getPlayerCount()*10
- givePlayerMoney ( source, money1 )
- outputChatBox ("Server: #FFAA00You were awarded with #ffffff$"..money1.."#FFAA00 for winning this map!", source, 255, 255, 255, true )
- player_account = getPlayerAccount ( source )
- if not isGuestAccount ( player_account ) then
- playerwins = getAccountData ( player_account, "wins" )
- setAccountData ( player_account, "wins", playerwins+1 )
- end
- outputChatBox ( "test1" )
- end
- if rank == 2 then
- money2 = getPlayerCount()*2
- givePlayerMoney ( source, money2 )
- outputChatBox ("Server: #FFAA00You were awarded with #ffffff$"..money2.."#FFAA00 for being second in this map!", source, 255, 255, 255, true )
- outputChatBox ( "test2" )
- end
- if rank == 3 then
- money3 = getPlayerCount()
- givePlayerMoney ( source, money3 )
- outputChatBox ("Server: #FFAA00You were awarded with #ffffff$"..money3.."#FFAA00 for being third in this map!", source, 255, 255, 255, true )
- outputChatBox ( "test3" )
- end
- end
- else
- outputChatBox ("Server: #FFAA00No money is awarded for winning this map, because there are only 2 people in the server!", source, 255, 255, 255, true )
- end
- addEventHandler ( "onPlayerFinish", getRootElement(), player_finish )
- addEventHandler ( "onPlayerFinishDD", getRootElement(), player_finish )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement