Advertisement
Harexe2

Untitled

Jul 15th, 2016
487
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. //RobBank FS by Harexe
  2. #include <a_samp>
  3. #include <ocmd>
  4.  
  5. #define COLOR_WHITE 0xFFFFFFAA
  6. new kill;
  7. forward robtimer(playerid);
  8. forward waittimer();
  9.  
  10. new robpossible;
  11.  
  12. public OnFilterScriptInit()
  13. {
  14. CreatePickup(1274, 0, 1467.6721,-1013.2075,1301.1060, -1);
  15. Create3DTextLabel("LosSantos Banka\nCMD:\n/robbank", 0x008080FF, 1467.6721,-1013.2075,1301.1060,50.00, 0, 0);
  16. robpossible = 1;
  17. return 1;
  18. }
  19. public OnFilterScriptExit()
  20. {
  21.  
  22. return 1;
  23. }
  24.  
  25. ocmd:robbank(playerid, params[])
  26. {
  27. if(robpossible == 1)
  28. {
  29. if(IsPlayerInRangeOfPoint(playerid, 3.0, 1467.6721,-1013.2075,1301.1060))
  30. {
  31. robpossible = 0;
  32. SetTimer("waittimer", 600000, false);
  33. kill = SetTimer("robtimer", 300000, false);
  34.  
  35. SendClientMessage(playerid, COLOR_WHITE, "Poceo si pljackat banku policijaje obavjestena");
  36. SendClientMessage(playerid, COLOR_WHITE, "Moras cekat 5min da opljakas banku!");
  37. TogglePlayerControllable(playerid,0);
  38. }
  39. } else {
  40. SendClientMessage(playerid, COLOR_WHITE, "You can't rob the bank right now!");
  41. }
  42. return 1;
  43. }
  44.  
  45.  
  46. public robtimer(playerid)
  47. {
  48. new string[128];
  49. new cash = random(200000);
  50. GivePlayerMoney(playerid, cash);
  51.  
  52. format(string, sizeof(string), "Uspjasno si opljacko $%d !", cash);
  53. TogglePlayerControllable(playerid,1);
  54. SendClientMessage(playerid, COLOR_WHITE, string);
  55. KillTimer(kill);
  56. }
  57.  
  58. public waittimer()
  59. {
  60. robpossible = 1;
  61. SendClientMessageToAll(COLOR_WHITE, "Banka je opet spremna za pljacku!");
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement