Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 5.44 KB | None | 0 0
  1. new Andromeda;
  2. new Missile;
  3. new Missile2;
  4. new Missile3;
  5. new Missile4;
  6. new Missile5;
  7. new Test;
  8. new Test2;
  9. new Test3;
  10. new Test4;
  11. new Test5;
  12.  
  13. public OnPlayerCommandText(playerid, cmdtext[])
  14. {
  15.         if(strcmp(cmdtext, "/airstrike", true) == 0)
  16.         {
  17.         new Float:x, Float:y, Float:z, Float:rX, Float:rY, Float:rZ;
  18.         {
  19.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
  20.         GetPlayerPos(playerid, x, y, z);
  21.         Test = CreateObject(2061, x, y, z-2, rX, rY, rZ);
  22.         Test2 = CreateObject(2061, x, y+20, z-2, rX, rY, rZ);
  23.         Test3 = CreateObject(2061, x, y-20, z-2, rX, rY, rZ);
  24.         Test4 = CreateObject(2061, x+20, y, z-2, rX, rY, rZ);
  25.         Test5 = CreateObject(2061, x-20, y, z-2, rX, rY, rZ);
  26.         Andromeda = CreateObject(1683, x, y+900, z+30, rX, rY, 270);
  27.         GetObjectPos(Andromeda, x, y, z);
  28.         MoveObject(Andromeda, x, y-1800, z, 15);
  29.         SetTimerEx("ResetCell", 5000, 0, "i", playerid);
  30.         SetTimerEx("AndrBomb", 20000, 0, "i", playerid);
  31.         SetTimerEx("AndrBomb2", 21000, 0, "i", playerid);
  32.         SetTimerEx("AndrBomb3", 22000, 0, "i", playerid);
  33.         SetTimerEx("AndrBomb4", 23000, 0, "i", playerid);
  34.         SetTimerEx("AndrBomb5", 23000, 0, "i", playerid);
  35.         SendClientMessage(playerid, RED, "[WARNING!]Incoming Airstrike! You Have 20 Secs To Leave The Area!");
  36.         SendClientMessage(playerid, RED, "[ATT]:Cost 1000 Fuel To Prepare This Airstrike!");
  37.         }
  38.         return 1;
  39.         }
  40.  
  41.  
  42. forward ResetCell(playerid);
  43. public ResetCell(playerid)
  44. {
  45.     new Float:x, Float:y, Float:z;
  46.     SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
  47.     GetPlayerPos(playerid, x, y, z);
  48.     SetPlayerCheckpoint(playerid, x, y, z, 2);
  49.     return 1;
  50. }
  51.  
  52. forward AndrBomb(playerid);
  53. public AndrBomb(playerid)
  54. {
  55.     new Float:x, Float:y, Float:z, Float:rZ;
  56.     GetObjectPos(Test, x, y, z);
  57.     Missile = CreateObject(3790, x, y, z+30, 90, 90, rZ);
  58.     GetObjectPos(Test, x, y, z);
  59.     MoveObject(Missile, x, y+3, z, 20);
  60.     SetTimerEx("MissileExplode", 1500, 0, "i", playerid);
  61.     return 1;
  62. }
  63.  
  64. forward AndrBomb2(playerid);
  65. public AndrBomb2(playerid)
  66. {
  67.     new Float:x, Float:y, Float:z, Float:rZ;
  68.     GetObjectPos(Test2, x, y, z);
  69.     Missile2 = CreateObject(3790, x, y, z+30, 90, 90, rZ);
  70.     GetObjectPos(Test2, x, y, z);
  71.     MoveObject(Missile2, x, y+3, z, 20);
  72.     SetTimerEx("MissileExplode2", 1500, 0, "i", playerid);
  73.     return 1;
  74. }
  75.  
  76. forward AndrBomb3(playerid);
  77. public AndrBomb3(playerid)
  78. {
  79.     new Float:x, Float:y, Float:z, Float:rZ;
  80.     GetObjectPos(Test3, x, y, z);
  81.     Missile3 = CreateObject(3790, x, y, z+30, 90, 90, rZ);
  82.     GetObjectPos(Test3, x, y, z);
  83.     MoveObject(Missile3, x, y+3, z, 20);
  84.     SetTimerEx("MissileExplode3", 1500, 0, "i", playerid);
  85.     return 1;
  86. }
  87. forward AndrBomb4(playerid);
  88. public AndrBomb4(playerid)
  89. {
  90.     new Float:x, Float:y, Float:z, Float:rZ;
  91.     GetObjectPos(Test4, x, y, z);
  92.     Missile4 = CreateObject(3790, x, y, z+30, 90, 90, rZ);
  93.     GetObjectPos(Test4, x, y, z);
  94.     MoveObject(Missile4, x, y+3, z, 20);
  95.     SetTimerEx("MissileExplode4", 1500, 0, "i", playerid);
  96.     return 1;
  97. }
  98.  
  99. forward AndrBomb5(playerid);
  100. public AndrBomb5(playerid)
  101. {
  102.     new Float:x, Float:y, Float:z, Float:rZ;
  103.     GetObjectPos(Test5, x, y, z);
  104.     Missile5 = CreateObject(3790, x, y, z+30, 90, 90, rZ);
  105.     GetObjectPos(Test5, x, y, z);
  106.     MoveObject(Missile5, x, y+3, z, 20);
  107.     SetTimerEx("MissileExplode5", 1500, 0, "i", playerid);
  108.     return 1;
  109. }
  110.  
  111. forward MissileExplode(playerid);
  112. public MissileExplode(playerid)
  113. {
  114.     new Float:x, Float:y, Float:z;
  115.     GetObjectPos(Missile, x, y, z);
  116.     CreateExplosion(x, y+5, z, 7, 5);
  117.     CreateExplosion(x, y-5, z, 7, 5);
  118.     CreateExplosion(x+5, y, z, 7, 5);
  119.     CreateExplosion(x-5, y, z, 7, 5);
  120.     DestroyObject(Missile);
  121.     DestroyObject(Test);
  122.     DisablePlayerCheckpoint(playerid);
  123.     SetTimerEx("DestroyPlane", 30000, 0, "i", playerid);
  124.     return 1;
  125. }
  126.  
  127. forward MissileExplode2(playerid);
  128. public MissileExplode2(playerid)
  129. {
  130.     new Float:x, Float:y, Float:z;
  131.     GetObjectPos(Missile2, x, y, z);
  132.     CreateExplosion(x, y+5, z, 7, 5);
  133.     CreateExplosion(x, y-5, z, 7, 5);
  134.     CreateExplosion(x+5, y, z, 7, 5);
  135.     CreateExplosion(x-5, y, z, 7, 5);
  136.     DestroyObject(Missile2);
  137.     DestroyObject(Test2);
  138.     DisablePlayerCheckpoint(playerid);
  139.     return 1;
  140. }
  141.  
  142. forward MissileExplode3(playerid);
  143. public MissileExplode3(playerid)
  144. {
  145.     new Float:x, Float:y, Float:z;
  146.     GetObjectPos(Missile3, x, y, z);
  147.     CreateExplosion(x, y+5, z, 7, 5);
  148.     CreateExplosion(x, y-5, z, 7, 5);
  149.     CreateExplosion(x+5, y, z, 7, 5);
  150.     CreateExplosion(x-5, y, z, 7, 5);
  151.     DestroyObject(Missile3);
  152.     DestroyObject(Test3);
  153.     DisablePlayerCheckpoint(playerid);
  154.     return 1;
  155. }
  156.  
  157. forward MissileExplode4(playerid);
  158. public MissileExplode4(playerid)
  159. {
  160.     new Float:x, Float:y, Float:z;
  161.     GetObjectPos(Missile4, x, y, z);
  162.     CreateExplosion(x, y+5, z, 7, 5);
  163.     CreateExplosion(x, y-5, z, 7, 5);
  164.     CreateExplosion(x+5, y, z, 7, 5);
  165.     CreateExplosion(x-5, y, z, 7, 5);
  166.     DestroyObject(Missile4);
  167.     DestroyObject(Test4);
  168.     DisablePlayerCheckpoint(playerid);
  169.     return 1;
  170. }
  171.  
  172. forward MissileExplode5(playerid);
  173. public MissileExplode5(playerid)
  174. {
  175.     new Float:x, Float:y, Float:z;
  176.     GetObjectPos(Missile5, x, y, z);
  177.     CreateExplosion(x, y+5, z, 7, 5);
  178.     CreateExplosion(x, y-5, z, 7, 5);
  179.     CreateExplosion(x+5, y, z, 7, 5);
  180.     CreateExplosion(x-5, y, z, 7, 5);
  181.     DestroyObject(Missile5);
  182.     DestroyObject(Test5);
  183.     DisablePlayerCheckpoint(playerid);
  184.     return 1;
  185. }
  186.  
  187. forward DestroyPlane(playerid);
  188. public DestroyPlane(playerid)
  189. {
  190.     DestroyObject(Andromeda);
  191.     return 1;
  192. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement