KillerDVX

Untitled

Jun 22nd, 2015
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. #include <a_samp>
  2. #include <foreach>
  3.  
  4. #define COLOR_RED 0xFF0000AA
  5.  
  6. #pragma tabsize 0
  7. //**********************
  8.  
  9. #define PUBLIC:%0(%1) forward %0(%1); \
  10. public %0(%1) //An easy definition of public and forward
  11.  
  12. //**********************
  13.  
  14. new MoneyLost[MAX_PLAYERS];
  15.  
  16. //**********************
  17.  
  18. PUBLIC:OnPlayerUpdate(playerid)
  19. {
  20. if(GetPlayerMoney(playerid) > 1000000)
  21. {
  22. MoneyLost[playerid] =1;
  23. return 1;
  24. }
  25. else if(GetPlayerMoney(playerid) < 999999)
  26. {
  27. MoneyLost[playerid] =0;
  28. return 1;
  29. }
  30. return 1;
  31. }
  32.  
  33. //**********************
  34.  
  35. PUBLIC:OnFilterScriptInit()
  36. {
  37. SetTimer("MoneyInUs",10000,1);
  38. return 1;
  39. }
  40.  
  41. //**********************
  42.  
  43. PUBLIC:MoneyInUs()
  44. {
  45. foreach(new i:Player)
  46. {
  47. if(IsPlayerConnected(i)) {
  48. if(MoneyLost[i] == 1) {
  49. GivePlayerMoney(i,-3000); //You can change this
  50. SendClientMessage(i,COLOR_RED,"You have lost 3000$, go deposit them in the bank!");
  51. }
  52. }
  53. }
  54. return 1;
  55. }
Advertisement
Add Comment
Please, Sign In to add comment