Guest User

ServerSide.inc - High Money Hack Protection Stable

a guest
Feb 20th, 2016
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. new amount[MAX_PLAYERS];
  4.  
  5. //==============================================================================
  6.  
  7. public OnFilterScriptInit()
  8. {
  9. SetTimer("MoneyToCash", 1000, true);
  10. print("\n=========================================");
  11. print("ServerSide.inc - By illuminati2 18/2/2016");
  12. print("=========================================\n");
  13. return 1;
  14. }
  15.  
  16. #if defined _ALS_OnFilterScriptInit
  17. #undef OnFilterScriptInit
  18. #else
  19. #define _ALS_OnFilterScriptInit
  20. #endif
  21. #define OnFilterScriptInit AMH_OnFilterScriptInit
  22.  
  23. forward AMH_OnFilterScriptInit();
  24.  
  25. //==============================================================================
  26. forward MoneyToCash();
  27. public MoneyToCash()
  28. {
  29. for(new i; i <= GetMaxPlayers(); i++)
  30. {
  31. if(GetPlayerMoney(i) != amount[i])
  32. {
  33. ResetPlayerMoney(i);
  34. GivePlayerMoney(i, amount[i]);
  35. }
  36. }
  37. return 1;
  38. }
  39.  
  40. forward _ALT_GivePlayerMoney(playerid, Amount);
  41. public _ALT_GivePlayerMoney(playerid, Amount)
  42. {
  43. amount[playerid] += Amount;
  44. return 1;
  45. }
  46. #define GivePlayerMoney _ALT_GivePlayerMoney
  47.  
  48. forward _ALT_ResetPlayerMoney(playerid);
  49. public _ALT_ResetPlayerMoney(playerid)
  50. {
  51. amount[playerid] = 0;
  52. return 1;
  53. }
  54. #define ResetPlayerMoney _ALT_ResetPlayerMoney
  55.  
  56. //==============================================================================
  57.  
  58. stock SetPlayerMoney(playerid, Amount)
  59. {
  60. amount[playerid] = Amount;
  61. return 1;
  62. }
Add Comment
Please, Sign In to add comment