Guest User

RobBank

a guest
Jul 27th, 2012
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1. /*
  2.  
  3.  
  4.  
  5. [FilterScript] nV_robbank
  6.  
  7.  
  8. BY NENO
  9.  
  10.  
  11.  
  12. */
  13.  
  14. #include <a_samp>
  15. #include <zcmd>
  16. #define COLOR_ORANGE 0xFF641AFF
  17.  
  18. new rb;
  19.  
  20. //------------------------------------------------------------------------------
  21.  
  22. public OnFilterScriptInit()
  23. {
  24. print("\n--------------------------------------");
  25. print(" By Neno ");
  26. print("--------------------------------------\n");
  27.  
  28. Create3DTextLabel("Banka Las Venturas...\nKucaj /robbank da pljackas banku!", 0xFF641AFF, 2194.4883,1677.0996,12.3672, 40.0, 0);
  29. rb = CreatePickup(1239, 2, 2194.4883,1677.0996,12.3672, -1);
  30. return 1;
  31. }
  32.  
  33. //------------------------------------------------------------------------------
  34.  
  35. public OnFilterScriptExit()
  36. {
  37. DestroyPickup(rb);
  38. return 1;
  39. }
  40.  
  41. //------------------------------------------------------------------------------
  42.  
  43. public OnPlayerPickUpPickup(playerid, pickupid)
  44. {
  45. if(pickupid == rb)
  46. {
  47. GameTextForPlayer(playerid,"~r~[FilterScript] nV_robbank:~w~/robbank",5000,5);
  48. }
  49. return 1;
  50. }
  51.  
  52. //------------------------------------------------------------------------------
  53.  
  54. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  55. {
  56. return 1;
  57. }
  58.  
  59. //------------------------------------------------------------------------------
  60.  
  61. CMD:robbank(playerid, params[])
  62. {
  63. if( IsPlayerInRangeOfPoint( playerid, 3.0, 2194.4883,1677.0996,12.3672) )
  64. {
  65. new rb = random(3);
  66.  
  67. if(rb == 1 || rb == 2)
  68. {
  69. GivePlayerMoney(playerid, 5000);
  70. new pname[MAX_PLAYER_NAME], string[58 + MAX_PLAYER_NAME];
  71. GetPlayerName(playerid, pname, sizeof(pname));
  72. format(string, sizeof(string), "%s je opljackao banku!", pname);
  73. SendClientMessageToAll(COLOR_ORANGE, string);
  74. SetPlayerAttachedObject(playerid, 0, 1550, 1, 0.168857, -0.223739, 0.016255, 116.071144, 104.168029, 42.844120, 1.000000, 1.000000, 1.000000 );
  75. }
  76. else
  77. {
  78. GivePlayerMoney(playerid, 0);
  79. new pname[MAX_PLAYER_NAME], string[58 + MAX_PLAYER_NAME];
  80. GetPlayerName(playerid, pname, sizeof(pname));
  81. format(string, sizeof(string), "%s je pokusao opljackati banku,ali nije uspio!", pname);
  82. SendClientMessageToAll(COLOR_ORANGE, string);
  83. }
  84. }
  85. return 1;
  86. }
Add Comment
Please, Sign In to add comment