toribio

toribio

Jan 15th, 2009
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.80 KB | None | 0 0
  1. //no topo:
  2. forward AtualizarGrana();
  3. new playermoney[MAX_PLAYERS];
  4.  
  5. //no OnGameModeInit:
  6. SetTimer("AtualizarGrana", 10000, 1);
  7.  
  8. //no fim do mode:
  9. public AtualizarGrana()
  10. {
  11.     for(new i;i<MAX_PLAYERS;i++)
  12.     {
  13.         GivePlayerMoney(i, -GetPlayerMoney(i)); //nem essa pra ResetPlayerMoneyEx! n�o troque!
  14.         GivePlayerMoney(i, GetPlayerMoneyEx(i)); //n�o troque essa fun��o para GivePlayerMoneyEx!
  15.     }
  16. }
  17.  
  18. stock GivePlayerMoneyEx(playerid, ammount)return playermoney[playerid] += ammount;
  19. stock GetPlayerMoneyEx(playerid)return playermoney[playerid];
  20. stock ResetPlayerMoneyEx(playerid)return playermoney[playerid] = 0;
  21.  
  22. //agora voc� pode trocar todas as outras fun��es GivePlayerMoney para GivePlayerMoneyEx, GetPlayerMoney para GetPlayerMoneyEx, e ResetPlayerMoney para ResetPlayerMoneyEx...
Add Comment
Please, Sign In to add comment