Guest User

Untitled

a guest
Sep 4th, 2012
532
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. // Air Strike FS by Kain1297
  2. #define FILTERSCRIPT
  3.  
  4. #include <a_samp>
  5.  
  6. #if defined FILTERSCRIPT
  7. forward air();
  8. new taimr;
  9. public OnFilterScriptInit()
  10. {
  11. print("\n--------------------------------------");
  12. print(" Air strike FS by kain1297 (aka: [FAT] Kenneth, LST Commander");
  13. print("--------------------------------------\n");
  14. return 1;
  15. }
  16.  
  17. public OnFilterScriptExit()
  18. {
  19. return 1;
  20. }
  21.  
  22. #else
  23.  
  24. main()
  25. {
  26. print("\n----------------------------------");
  27. print(" Blank Gamemode by your name here");
  28. print("----------------------------------\n");
  29. }
  30.  
  31. #endif
  32.  
  33. public OnGameModeInit()
  34. {
  35. // Don't use these lines if it's a filterscript
  36. SetGameModeText("Blank Script");
  37. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  38. return 1;
  39. }
  40.  
  41. public OnGameModeExit()
  42. {
  43. return 1;
  44. }
  45. new smok;
  46. new Float:q, Float:w, Float:e;
  47. public OnPlayerCommandText(playerid, cmdtext[])
  48. {
  49. new Float:x, Float:y, Float:z;
  50. if (strcmp("/support", cmdtext, true, 10) == 0)
  51. {
  52. GetPlayerPos(playerid, x,y,z);
  53. smok = CreateObject(18728, x, y, z-2.60, 0.00, 0.00, 0.00);
  54. GetObjectPos(smok,q,w,e);
  55. SetTimer("air",7000,false);
  56. GameTextForPlayer(playerid,"~g~Air strike inbound!",2000,5);
  57. PlayerPlaySound(playerid, 33889,x,y,z);
  58. return 1;
  59. }
  60. return 0;
  61. }
  62. public air()
  63. {
  64. for(new playerid; playerid<GetMaxPlayers(); playerid++)
  65. PlayerPlaySound(playerid, 42205,q,w,e);
  66. taimr = SetTimer("air2",300,true);
  67. SetTimer("air3",2000,false);
  68. }
  69. forward air2();
  70. public air2()
  71. {
  72. new ran = random(5);
  73. if(ran == 3)
  74. {
  75. CreateExplosion(q,w,e,7,50.0);
  76. }
  77. if(ran == 2)
  78. {
  79. CreateExplosion(q,w+10.0,e,7,50.0);
  80. }
  81. if(ran == 1)
  82. {
  83. CreateExplosion(q,w+15.0,e,7,50.0);
  84. }
  85. if(ran == 4)
  86. {
  87. CreateExplosion(q+20,w+20.0,e,7,50.0);
  88. }
  89. }
  90. forward air3();
  91. public air3()
  92. {
  93. KillTimer(taimr);
  94. DestroyObject(smok);
  95. }
Advertisement
Add Comment
Please, Sign In to add comment