Advertisement
Kucin666

Terrorist Job

Aug 7th, 2015
518
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.06 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3. #include <streamer>
  4.  
  5. new TerroristBomb[MAX_PLAYERS];
  6. new pickupterrorist;
  7.  
  8. public OnFilterScriptInit()
  9. {
  10. print("\n--------------------------------------");
  11. print(" Job Terrorist By Kucin666 Loaded");
  12. print("--------------------------------------\n");
  13. return 1;
  14. }
  15.  
  16. public OnFilterScriptExit()
  17. {
  18. print("\n--------------------------------------");
  19. print(" Job Terrorist By Kucin666 Unloaded");
  20. print("--------------------------------------\n");
  21. return 1;
  22. }
  23.  
  24. public OnPlayerConnect(playerid)
  25. {
  26. TerroristBomb[playerid] = 0;
  27. pickupterrorist = CreatePickup(1252 , 1, 2657.9956,-1589.4816,13.9864);
  28. CreateDynamicMapIcon(2657.9956,-1589.4816,13.9864, 43, 0);
  29. return 1;
  30. }
  31.  
  32. public OnPlayerDeath(playerid, killerid, reason)
  33. {
  34. TerroristBomb[playerid] = 0;
  35. DisablePlayerCheckpoint(playerid);
  36. return 1;
  37. }
  38.  
  39. public OnPlayerPickUpPickup(playerid, pickupid)
  40. {
  41. if(pickupid == pickupterrorist)
  42. {
  43. GameTextForPlayer(playerid,"Please type /terrorist to work as a terrorist.",3000,1);
  44. }
  45. return 1;
  46. }
  47.  
  48. public OnPlayerEnterCheckpoint(playerid)
  49. {
  50. if(IsPlayerInAnyVehicle(playerid)) {
  51. SendClientMessage(playerid,0xFF0000AA,"You must be on foot to put a bomb.");
  52. return 1;
  53. }
  54. else
  55. if(TerroristBomb[playerid] == 1){
  56. TerroristBomb[playerid] = 2;
  57. SetPlayerCheckpoint(playerid,2692.1714,-1708.7668,11.8478,3);
  58. ClearAnimations(playerid);
  59. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  60. return 1;
  61. }
  62. if(TerroristBomb[playerid] == 2){
  63. TerroristBomb[playerid] = 3;
  64. SetPlayerCheckpoint(playerid,2817.4719,-1622.7756,11.0918,3);
  65. ClearAnimations(playerid);
  66. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  67. return 1;
  68. }
  69. if(TerroristBomb[playerid] == 3){
  70. TerroristBomb[playerid] = 4;
  71. SetPlayerCheckpoint(playerid,2852.9338,-1532.5073,11.0938,3);
  72. ClearAnimations(playerid);
  73. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  74. return 1;
  75. }
  76. if(TerroristBomb[playerid] == 4){
  77. TerroristBomb[playerid] = 5;
  78. SetPlayerCheckpoint(playerid,2750.3342,-1468.0583,30.4531,3);
  79. ClearAnimations(playerid);
  80. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  81. return 1;
  82. }
  83. if(TerroristBomb[playerid] == 5){
  84. TerroristBomb[playerid] = 6;
  85. SetPlayerCheckpoint(playerid,2635.1741,-1394.8597,30.4168,3);
  86. ClearAnimations(playerid);
  87. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  88. return 1;
  89. }
  90. if(TerroristBomb[playerid] == 6){
  91. TerroristBomb[playerid] = 7;
  92. SetPlayerCheckpoint(playerid,2658.0977,-1591.6510,13.7122,3);
  93. ClearAnimations(playerid);
  94. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  95. return 1;
  96. }
  97. if(TerroristBomb[playerid] == 7){
  98. TerroristBomb[playerid] = 0;
  99. DisablePlayerCheckpoint(playerid);
  100. SendClientMessage(playerid,0xFFFF00AA,"You have completed the job and get 15000$.");
  101. GivePlayerMoney(playerid,15000);
  102. }
  103. return 1;
  104. }
  105.  
  106. CMD:terrorist(playerid, params[])
  107. {
  108. if(IsPlayerInRangeOfPoint(playerid, 1, 2657.9956,-1589.4816,13.9864))
  109. {
  110. TerroristBomb[playerid] = 1;
  111. new name[MAX_PLAYER_NAME], string[128];
  112. GetPlayerName(playerid, name, sizeof(name));
  113. format(string, sizeof(string), "%s was working as a Terrorist. Type /jobterrorist to go to work terrorist.", name );
  114. SendClientMessageToAll(0xFFFF00AA, string);
  115. SendClientMessage(playerid,0xFFFF00AA,"Please follow the red checkpoint to start working as a terrorist and put a bomb.");
  116. SetPlayerCheckpoint(playerid, 2692.1714,-1708.7668,11.8478,3);
  117. return 1;
  118. }
  119. else
  120. {
  121. SendClientMessage(playerid, 0xFF0000AA, "You must be at work terrorist to use this command.");
  122. }
  123. return 1;
  124. }
  125.  
  126. CMD:jobterrorist(playerid, params[])
  127. {
  128. if(TerroristBomb[playerid] == 7)
  129. {
  130. SendClientMessage(playerid, 0xFF0000AA, "You're not allowed to use it this command while working.");
  131. return 1;
  132. }
  133. else
  134. SetPlayerInterior(playerid, 0);
  135. SetPlayerPos(playerid, 2657.2930,-1596.1967,12.9181);
  136. return 1;
  137. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement