Advertisement
Xeix

[FilterScript] Simple Bank Robbery System!

Aug 7th, 2014
1,783
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. //This filterscript was made by UnlimitedDeveloper on SA-MP Forums, credits to him. I made it better/edited it. / ScriptFohLife on SA-MP Forums.
  2. #include <a_samp>
  3. #include <zcmd>
  4.  
  5. #define COLOR_WHITE 0xFFFFFFAA
  6. #define COLOR_GREEN 0x33AA33AA
  7. #define COLOR_TWBLUE 0x0000FFAA
  8.  
  9. forward robtimer(playerid);
  10. forward waittimer();
  11.  
  12. new robpossible;
  13.  
  14. public OnFilterScriptInit()
  15. {
  16.  
  17. robpossible = 1;
  18. return 1;
  19. }
  20.  
  21. CMD:robbank(playerid, params[])
  22. {
  23. if(robpossible == 1)
  24. {
  25. if(IsPlayerInRangeOfPoint(playerid, 3.0, 2309.1899,-8.4444,26.7422))
  26. {
  27. robpossible = 0;
  28. SetTimer("waittimer", 1200000, false);
  29. SetTimer("robtimer", 240000, false);
  30.  
  31. SendClientMessage(playerid, COLOR_WHITE, "You gotta stay 2 minutes in the bank in order to rob it!");
  32. SendClientMessageToAll(COLOR_TWBLUE, "||----------------Latest News----------------||");
  33. SendClientMessageToAll(COLOR_GREEN, " Los Santos Bank Trust has Been Broken.");
  34. SendClientMessageToAll(COLOR_GREEN, " The Bank is Currentley getting Robbed. ");
  35. SendClientMessageToAll(COLOR_GREEN, " We will report more once we get more information.");
  36. SendClientMessageToAll(COLOR_TWBLUE, "||----------------Latest News----------------||");
  37. }
  38. } else {
  39. SendClientMessage(playerid, COLOR_WHITE, "You can't rob the bank right now!");
  40. }
  41. return 1;
  42. }
  43.  
  44. public robtimer(playerid)
  45. {
  46. if(!IsPlayerInRangeOfPoint(playerid, 4.0, 2309.1899,-8.4444,26.7422))
  47. {
  48. SendClientMessage(playerid, -1, "You failed to rob the bank!");
  49. return 1;
  50. }
  51. new string[128];
  52. new cash = random(200000);
  53. GivePlayerMoney(playerid, cash);
  54.  
  55. format(string, sizeof(string), "You have successfully robbed $%d from the bank!", cash);
  56. SendClientMessage(playerid, COLOR_WHITE, string);
  57. }
  58.  
  59. public waittimer()
  60. {
  61. robpossible = 1;
  62. SendClientMessageToAll(COLOR_WHITE, "The bank is now available for robbery!");
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement