Guest User

Untitled

a guest
Aug 21st, 2012
2,102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. //-- Money sistem NA POCETAK SKRIPTE
  2. new Text:pare0[MAX_PLAYERS];
  3. forward Cosak(playerid);
  4. new CosakTimer[MAX_PLAYERS];
  5.  
  6. ONPLAYERCONNECT
  7. CosakTimer[playerid]=SetTimerEx("Cosak", 800,1,"i", playerid);
  8. //--Pare sistem--
  9. pare0[playerid] = TextDrawCreate(497.000000, 97.000000, "$0000000");
  10. TextDrawBackgroundColor(pare0[playerid], 255);
  11. TextDrawFont(pare0[playerid], 3);
  12. TextDrawLetterSize(pare0[playerid], 0.700000, 2.200000);
  13. TextDrawColor(pare0[playerid], -32568);
  14. TextDrawSetOutline(pare0[playerid], 1);
  15. TextDrawSetProportional(pare0[playerid], 1);
  16.  
  17.  
  18.  
  19. NA DNO MODA
  20. public Cosak(playerid)
  21. {
  22. new pare = GetPlayerMoney(playerid);
  23. new acc = PlayerInfo[playerid][pAccount];
  24. new string[128];
  25. if(acc > 0)
  26. {
  27. format(string, sizeof(string), "$%d", acc);
  28. TextDrawSetString(pare0[playerid], string);
  29. TextDrawShowForPlayer(playerid, pare0[playerid]);
  30. }
  31. else if(acc < 0)
  32. {
  33. format(string, sizeof(string), "~r~-$%d", acc);
  34. TextDrawSetString(pare0[playerid], string);
  35. TextDrawShowForPlayer(playerid, pare0[playerid]);
  36. }
  37. else if(acc == 0)
  38. {
  39. format(string, sizeof(string), "$0");
  40. TextDrawSetString(pare0[playerid], string);
  41. TextDrawShowForPlayer(playerid, pare0[playerid]);
  42. }
  43. return 1;
  44. }
  45.  
  46. ONPLAYERDISCONNECT
  47. KillTimer(CosakTimer[playerid]);
Advertisement
Add Comment
Please, Sign In to add comment