Advertisement
Guest User

Untitled

a guest
Apr 14th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.55 KB | None | 0 0
  1. function payoutPlayers(){
  2.     local topArray = [];
  3.     foreach(id, score in playerScores){
  4.         if(score > 0){
  5.             topArray.push({id = id, score = score});
  6.         }
  7.     }
  8.    
  9.     topArray.sort(sortScores);
  10.     local _payout = currentMinigame.payout;
  11.     foreach(pos, scoreinfo in topArray){
  12.         local _player = FindPlayer(scoreinfo.id);
  13.         if(_player){           
  14.             local realpos = pos + 1;
  15.             //_player.Cash += _payout;
  16.             BigMessage(_player, "You came " + realpos + " in the " + currentMinigame.name, 5000, 3);           
  17.             _payout = abs(_payout * 0.8);          
  18.         }
  19.         _player = null;
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement