Advertisement
Guest User

Sergio...

a guest
Aug 13th, 2010
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.32 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. #define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6.  
  7. #if defined FILTERSCRIPT
  8.  
  9. new DoorL;
  10. new GateXt;
  11. new GateXtx;
  12. new PrincipalgateR;
  13. new PrincipalgateL;
  14. new ligth1;
  15. new ligth2;
  16. new MisselEntrance;
  17. new rocket;
  18. new radarGate;
  19. new GatesClosed = 0;
  20. new DoorR;
  21. forward OpelAll();
  22. forward ResetMissel();
  23.  
  24. public OnFilterScriptInit()
  25. {
  26. print("\n--------------------------------------");
  27. print(" New Area 51 V2 by sergio Loaded");
  28. print("--------------------------------------\n");
  29. DoorL = CreateObject(10184,266.67074585,1883.49304199,16.16238785,359.93017578,271.99877930,0.00125122);
  30. DoorR = CreateObject(10184,271.66687012,1883.66796875,16.16238785,359.92858887,271.99401855,180.00000000); //portao direito fexado
  31. GateXt = CreateObject(2951,297.81250000,1821.69628906,10.07812500,0.00000000,0.00000000,0.00000000); //portao xt aberto
  32. GateXtx = CreateObject(2951,277.24218750,1821.73925781,9.82812500,0.00000000,0.00000000,0.00000000); //portao xtx aberto
  33. PrincipalgateL = CreateObject(2929,219.65823364,1875.56335449,13.93899250,0.00000000,0.00000000,0.00000000); //portao principal esquerdo aberto
  34. PrincipalgateR = CreateObject(2927,208.04905701,1875.60437012,13.93899250,0.00000000,0.00000000,0.00000000); //portao principal direito aberto
  35. MisselEntrance = CreateObject(2951,268.22851562,1863.91992188,10.00781250,0.00000000,0.00000000,0.00000000); //portao entrada do missel aberto
  36. rocket = CreateObject(17050,268.78613281,1883.78320312,-31.09375000,0.00000000,0.00000000,0.00000000); //foguete
  37. radarGate = CreateObject(2951,233.68019104,1823.38232422,6.41406250,0.00000000,0.00000000,270.00000000); //portao do radar aberto
  38. return 1;
  39. }
  40.  
  41. public OnFilterScriptExit()
  42. {
  43. return 1;
  44. }
  45.  
  46. #else
  47.  
  48. main()
  49. {
  50. print("\n----------------------------------");
  51. print(" New Area 51 v2 by sergio Unloaded");
  52. print("----------------------------------\n");
  53. }
  54.  
  55. #endif
  56.  
  57. public OnPlayerCommandText(playerid, cmdtext[])
  58. {
  59. if (strcmp("/prepare", cmdtext, true, 10) == 0)
  60. {
  61. MoveObject(DoorL, 261.95645142,1882.90307617,16.16238785, 2.00);
  62. SetObjectRot(DoorL, 359.92858887,271.99401855,0.00000000);
  63. MoveObject(DoorR, 275.41372681,1883.79980469,16.16238785, 2.00);
  64. SetObjectRot(DoorR, 359.92309570,271.98852539,179.99450684);
  65. MoveObject(GateXt, 297.81304932,1821.69714355,6.82812500, 2.00);
  66. MoveObject(GateXtx, 277.24304199,1821.74011230,6.82812500, 2.00);
  67. MoveObject(PrincipalgateL, 215.87507629,1875.56689453,13.93899250, 2.00);
  68. MoveObject(PrincipalgateR, 211.79904175,1875.57324219,13.93899250, 2.00);
  69. MoveObject(MisselEntrance, 268.22900391,1863.92028809,7.75781250, 2.00);
  70. MoveObject(radarGate, 233.68019104,1823.38232422,6.41406250, 2.00);
  71. SetObjectRot(radarGate, 0.00000000,0.00000000,270.00000000);
  72. SendClientMessage(playerid,0xAAAAAAAA,"All doors will close in 2 seconds ...");
  73. ligth1 = CreateObject(3666,272.99337769,1888.38159180,17.15431023,0.00000000,0.00000000,0.00000000); //criar qnd abrir
  74. ligth2 = CreateObject(3666,264.22760010,1879.76318359,17.15431023,0.00000000,0.00000000,0.00000000); //object(airuntest_las) (3)
  75. GatesClosed = 1;
  76. return 1;
  77. }
  78. if (strcmp("/lauch", cmdtext, true, 10) == 0)
  79. {
  80. if(GatesClosed == 1)
  81. {
  82. MoveObject(rocket,268.78613281,1883.78320312,864.84967041,40.0);
  83. SetObjectRot(rocket,0.00000000,0.00000000,0.00000000);
  84. CreateExplosion(268.99725342,1883.84851074,-25.94452477, 1, 10.0); //object(binnt07_la) (1)
  85. CreateExplosion(268.99707031,1883.84765625,-23.94452477, 1, 10.0); //object(binnt07_la) (2)
  86. CreateExplosion(268.99707031,1883.84765625,-21.69452477, 1, 10.0); //object(binnt07_la) (3)
  87. CreateExplosion(268.99707031,1883.84765625,-19.19452477, 1, 10.0); //object(binnt07_la) (4)
  88. CreateExplosion(268.99707031,1883.84765625,-16.69452477, 1, 10.0); //object(binnt07_la) (5)
  89. CreateExplosion(268.99707031,1883.84765625,-13.94452477, 1, 10.0); //object(binnt07_la) (6)
  90. CreateExplosion(268.99707031,1883.84765625,-10.69452477, 1, 10.0); //object(binnt07_la) (7)
  91. CreateExplosion(268.99707031,1883.84765625,-7.94452477, 1, 10.0); //object(binnt07_la) (8)
  92. CreateExplosion(268.99707031,1883.84765625,-4.94452477, 1, 10.0); //object(binnt07_la) (9)
  93. CreateExplosion(268.99707031,1883.84765625,-2.19452477, 1, 10.0); //object(binnt07_la) (10)
  94. CreateExplosion(268.99707031,1883.84765625,0.80547523, 1, 10.0);//object(binnt07_la) (11)
  95. CreateExplosion(268.99707031,1883.84765625,3.55547523, 1, 10.0); //object(binnt07_la) (12)
  96. CreateExplosion(268.99707031,1883.84765625,6.80547523, 1, 10.0); //object(binnt07_la) (13)
  97. CreateExplosion(268.99707031,1883.84765625,10.55547523, 1, 10.0); //object(binnt07_la) (14)
  98. CreateExplosion(268.99707031,1883.84765625,19.80547523, 1, 10.0); //object(binnt07_la) (15)
  99. CreateExplosion(268.99707031,1883.84765625,19.80547523, 1, 10.0); //object(binnt07_la) (16)
  100. SendClientMessageToAll(0xAAAAAAAA, "space shuttle has just been released from area 51....");
  101. SendClientMessage(playerid,0xAAAAAAAA,"you launch the shuttle ... All gates will be opened in 10 seconds ...");
  102. GatesClosed = 0;
  103. SetTimer("OpelAll",10000,false);
  104. SetTimer("ResetMissel",20000,false);
  105. }
  106. return 1;
  107. }
  108. if (strcmp("/cancel", cmdtext, true, 10) == 0)
  109. {
  110. if(GatesClosed == 1)
  111. {
  112. MoveObject(DoorL, 266.67074585,1883.49304199,16.16238785, 2.00);//ok
  113. SetObjectRot(DoorL, 359.92858887,271.99401855,0.00000000);
  114. MoveObject(DoorR, 271.66687012,1883.66796875,16.16238785, 2.00);//ok
  115. SetObjectRot(DoorR, 359.92309570,271.98852539,179.99450684);
  116. MoveObject(GateXt, 297.81250000,1821.69628906,10.07812500, 2.00);//ok
  117. MoveObject(GateXtx, 277.24218750,1821.73925781,9.82812500, 2.00);//ok
  118. MoveObject(PrincipalgateL, 219.65823364,1875.56335449,13.93899250, 2.00);
  119. MoveObject(PrincipalgateR, 208.04905701,1875.60437012,13.93899250, 2.00);
  120. MoveObject(MisselEntrance, 268.22851562,1863.91992188,10.00781250, 2.00);
  121. MoveObject(radarGate, 233.68019104,1823.38232422,8.4140625, 2.00);
  122. SetObjectRot(radarGate, 0.00000000,0.00000000,270.00000000);
  123. SendClientMessage(playerid,0xAAAAAAAA,"You canceled the mission..");
  124. DestroyObject(ligth2);
  125. DestroyObject(ligth1);
  126. DestroyObject(rocket);
  127. rocket = CreateObject(17050,268.78613281,1883.78320312,-31.09375000,0.00000000,0.00000000,0.00000000); //foguete
  128. }
  129. return 1;
  130. }
  131. if (strcmp("/gotoA51", cmdtext, true, 10) == 0)
  132. {
  133. SetPlayerPos(playerid,94.5749,1919.9810,18.0819);
  134. return 1;
  135. }
  136. if (strcmp("/A51help", cmdtext, true, 10) == 0)
  137. {
  138. SendClientMessage(playerid,0xAAAAAAAA,"Commands: /gotoA51 , /prepare, /lauch , /cancel , resetmissel");
  139. return 1;
  140. }
  141. if (strcmp("/resetmissel", cmdtext, true, 10) == 0)
  142. {
  143. DestroyObject(rocket);
  144. OpelAll();
  145. rocket = CreateObject(17050,268.78613281,1883.78320312,-31.09375000,0.00000000,0.00000000,0.00000000); //foguete
  146. return 1;
  147. }
  148. return 0;
  149. }
  150. public OpelAll()
  151. {
  152. MoveObject(DoorL, 266.67074585,1883.49304199,16.16238785, 2.00);//ok
  153. SetObjectRot(DoorL, 359.92858887,271.99401855,0.00000000);
  154. MoveObject(DoorR, 271.66687012,1883.66796875,16.16238785, 2.00);//ok
  155. SetObjectRot(DoorR, 359.92309570,271.98852539,179.99450684);
  156. MoveObject(GateXt, 297.81250000,1821.69628906,10.07812500, 2.00);//ok
  157. MoveObject(GateXtx, 277.24218750,1821.73925781,9.82812500, 2.00);//ok
  158. MoveObject(PrincipalgateL, 219.65823364,1875.56335449,13.93899250, 2.00);
  159. MoveObject(PrincipalgateR, 208.04905701,1875.60437012,13.93899250, 2.00);
  160. MoveObject(MisselEntrance, 268.22851562,1863.91992188,10.00781250, 2.00);
  161. MoveObject(radarGate, 233.68019104,1823.38232422,8.4140625, 2.00);
  162. SetObjectRot(radarGate, 0.00000000,0.00000000,270.00000000);
  163. DestroyObject(ligth2);
  164. DestroyObject(ligth1);
  165. //DestroyObject(rocket);
  166. //rocket = CreateObject(17050,268.78613281,1883.78320312,-31.09375000,0.00000000,0.00000000,0.00000000); //foguete
  167. return 1;
  168. }
  169. public ResetMissel()
  170. {
  171. DestroyObject(rocket);
  172. rocket = CreateObject(17050,268.78613281,1883.78320312,-31.09375000,0.00000000,0.00000000,0.00000000); //foguete
  173. return 1;
  174. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement