Advertisement
Guest User

New area 69.

a guest
Oct 16th, 2010
1,163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 12.74 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. #define rocketspeed 45.0
  22. forward OpelAll();
  23. forward ResetMissel();
  24.  
  25. public OnFilterScriptInit()
  26. {
  27.     print("\n--------------------------------------");
  28.     print(" New Area 51 V3 by sergio Loaded");
  29.     print("--------------------------------------\n");
  30.     DoorL = CreateObject(10184,266.67074585,1883.49304199,16.16238785,359.93017578,271.99877930,0.00125122);
  31.     DoorR = CreateObject(10184,271.66687012,1883.66796875,16.16238785,359.92858887,271.99401855,180.00000000); //portao direito fexado
  32.     GateXt = CreateObject(2951,297.81250000,1821.69628906,10.07812500,0.00000000,0.00000000,0.00000000); //portao xt aberto
  33.     GateXtx = CreateObject(2951,277.24218750,1821.73925781,9.82812500,0.00000000,0.00000000,0.00000000); //portao xtx aberto
  34.     PrincipalgateL = CreateObject(2929,219.65823364,1875.56335449,13.93899250,0.00000000,0.00000000,0.00000000); //portao principal esquerdo aberto
  35.     PrincipalgateR = CreateObject(2927,208.04905701,1875.60437012,13.93899250,0.00000000,0.00000000,0.00000000); //portao principal direito aberto
  36.     MisselEntrance = CreateObject(2951,268.22851562,1863.91992188,10.00781250,0.00000000,0.00000000,0.00000000); //portao entrada do missel aberto
  37.     rocket = CreateObject(17050,268.78613281,1883.78320312,-31.09375000,0.00000000,0.00000000,0.00000000); //foguete
  38.     radarGate = CreateObject(2951,233.68019104,1823.38232422,6.41406250,0.00000000,0.00000000,270.00000000); //portao do radar aberto
  39.     return 1;
  40. }
  41.  
  42. public OnFilterScriptExit()
  43. {
  44.         return 1;
  45. }
  46.  
  47. #else
  48.  
  49. main()
  50. {
  51.     print("\n----------------------------------");
  52.     print(" New Area 51 v3 by sergio Unloaded");
  53.     print("----------------------------------\n");
  54. }
  55.  
  56. #endif
  57.  
  58. strtok(const string[], &index)
  59. {
  60.     new length = strlen(string);
  61.     while ((index < length) && (string[index] <= ' '))
  62.     {
  63.         index++;
  64.     }
  65.     new offset = index;
  66.     new result[20];
  67.     while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  68.     {
  69.         result[index - offset] = string[index];
  70.         index++;
  71.     }
  72.     result[index - offset] = EOS;
  73.     return result;
  74. }
  75.  
  76. public OnPlayerCommandText(playerid, cmdtext[])
  77. {
  78.     new tmp[256];
  79.     new cmd[256];
  80.     new idx;
  81.     cmd = strtok(cmdtext, idx);
  82.     if (strcmp(cmd, "/prepare", true) == 0)
  83.     {
  84.         MoveObject(DoorL, 261.95645142,1882.90307617,16.16238785, 2.00);
  85.         SetObjectRot(DoorL, 359.92858887,271.99401855,0.00000000);
  86.         MoveObject(DoorR, 275.41372681,1883.79980469,16.16238785, 2.00);
  87.         SetObjectRot(DoorR, 359.92309570,271.98852539,179.99450684);
  88.         MoveObject(GateXt, 297.81304932,1821.69714355,6.82812500, 2.00);
  89.         MoveObject(GateXtx, 277.24304199,1821.74011230,6.82812500, 2.00);
  90.         MoveObject(PrincipalgateL, 215.87507629,1875.56689453,13.93899250, 2.00);
  91.         MoveObject(PrincipalgateR, 211.79904175,1875.57324219,13.93899250, 2.00);
  92.         MoveObject(MisselEntrance, 268.22900391,1863.92028809,7.75781250, 2.00);
  93.         MoveObject(radarGate, 233.68019104,1823.38232422,6.41406250, 2.00);
  94.         SetObjectRot(radarGate, 0.00000000,0.00000000,270.00000000);
  95.         SendClientMessage(playerid,0xAAAAAAAA,"All doors will close in 2 seconds ...");
  96.         ligth1 = CreateObject(3666,272.99337769,1888.38159180,17.15431023,0.00000000,0.00000000,0.00000000); //criar qnd abrir
  97.         ligth2 = CreateObject(3666,264.22760010,1879.76318359,17.15431023,0.00000000,0.00000000,0.00000000); //object(airuntest_las) (3)
  98.         GatesClosed = 1;
  99.         return 1;
  100.     }
  101.     if (strcmp(cmd, "/lauch", true) == 0)
  102.     {
  103.         if(GatesClosed == 1)
  104.         {
  105.             MoveObject(rocket,268.78613281,1883.78320312,964.84967041,rocketspeed);//modificate speed in #define speed 45.0
  106.             SetObjectRot(rocket,0.00000000,0.00000000,0.00000000);
  107.             CreateExplosion(268.99725342,1883.84851074,-25.94452477, 1, 10.0); //object(binnt07_la) (1)
  108.             CreateExplosion(268.99707031,1883.84765625,-23.94452477, 1, 10.0); //object(binnt07_la) (2)
  109.             CreateExplosion(268.99707031,1883.84765625,-21.69452477, 1, 10.0); //object(binnt07_la) (3)
  110.             CreateExplosion(268.99707031,1883.84765625,-19.19452477, 1, 10.0); //object(binnt07_la) (4)
  111.             CreateExplosion(268.99707031,1883.84765625,-16.69452477, 1, 10.0); //object(binnt07_la) (5)
  112.             CreateExplosion(268.99707031,1883.84765625,-13.94452477, 1, 10.0); //object(binnt07_la) (6)
  113.             CreateExplosion(268.99707031,1883.84765625,-10.69452477, 1, 10.0); //object(binnt07_la) (7)
  114.             CreateExplosion(268.99707031,1883.84765625,-7.94452477, 1, 10.0); //object(binnt07_la) (8)
  115.             CreateExplosion(268.99707031,1883.84765625,-4.94452477, 1, 10.0); //object(binnt07_la) (9)
  116.             CreateExplosion(268.99707031,1883.84765625,-2.19452477, 1, 10.0); //object(binnt07_la) (10)
  117.             CreateExplosion(268.99707031,1883.84765625,0.80547523, 1, 10.0);//object(binnt07_la) (11)
  118.             CreateExplosion(268.99707031,1883.84765625,3.55547523, 1, 10.0); //object(binnt07_la) (12)
  119.             CreateExplosion(268.99707031,1883.84765625,6.80547523, 1, 10.0); //object(binnt07_la) (13)
  120.             CreateExplosion(268.99707031,1883.84765625,10.55547523, 1, 10.0); //object(binnt07_la) (14)
  121.             CreateExplosion(268.99707031,1883.84765625,19.80547523, 1, 10.0); //object(binnt07_la) (15)
  122.             CreateExplosion(268.99707031,1883.84765625,19.80547523, 1, 10.0); //object(binnt07_la) (16)
  123.             SendClientMessageToAll(0xAAAAAAAA,  "one Rocket has just been released from area 51....");
  124.             SendClientMessage(playerid,0xAAAAAAAA,"you launch the shuttle ... All gates will be opened in 10 seconds ...");
  125.             GatesClosed = 0;
  126.             SetTimer("OpelAll",10000,false);
  127.             SetTimer("ResetMissel",30000,false);
  128.         }
  129.         return 1;
  130.     }
  131.     if (strcmp(cmd, "/cancel", true) == 0)
  132.     {
  133.         if(GatesClosed == 1)
  134.         {
  135.             MoveObject(DoorL, 266.67074585,1883.49304199,16.16238785, 2.00);//ok
  136.             SetObjectRot(DoorL, 359.92858887,271.99401855,0.00000000);
  137.             MoveObject(DoorR, 271.66687012,1883.66796875,16.16238785, 2.00);//ok
  138.             SetObjectRot(DoorR, 359.92309570,271.98852539,179.99450684);
  139.             MoveObject(GateXt, 297.81250000,1821.69628906,10.07812500, 2.00);//ok
  140.             MoveObject(GateXtx, 277.24218750,1821.73925781,9.82812500, 2.00);//ok
  141.             MoveObject(PrincipalgateL, 219.65823364,1875.56335449,13.93899250, 2.00);
  142.             MoveObject(PrincipalgateR, 208.04905701,1875.60437012,13.93899250, 2.00);
  143.             MoveObject(MisselEntrance, 268.22851562,1863.91992188,10.00781250, 2.00);
  144.             MoveObject(radarGate, 233.68019104,1823.38232422,8.4140625, 2.00);
  145.             SetObjectRot(radarGate, 0.00000000,0.00000000,270.00000000);
  146.             SendClientMessage(playerid,0xAAAAAAAA,"You canceled the mission..");
  147.             DestroyObject(ligth2);
  148.             DestroyObject(ligth1);
  149.             DestroyObject(rocket);
  150.             rocket = CreateObject(17050,268.78613281,1883.78320312,-31.09375000,0.00000000,0.00000000,0.00000000); //foguete
  151.         }
  152.         return 1;
  153.     }
  154.     if (strcmp(cmd, "/gotoA51", true) == 0)
  155.     {
  156.         SetPlayerPos(playerid,94.5749,1919.9810,18.0819);
  157.         return 1;
  158.     }
  159.     if (strcmp(cmd, "/A51help", true) == 0)
  160.     {
  161.         SendClientMessage(playerid,0xAAAAAAAA,"Commands: /gotoA51 , /prepare, /lauch , /cancel , /resetmissel /open , /close");
  162.         return 1;
  163.     }
  164.     if (strcmp(cmd, "/resetmissel", true) == 0)
  165.     {
  166.         DestroyObject(rocket);
  167.         OpelAll();
  168.         rocket = CreateObject(17050,268.78613281,1883.78320312,-31.09375000,0.00000000,0.00000000,0.00000000); //foguete
  169.         return 1;
  170.     }
  171.     if (strcmp(cmd, "/open", true) == 0)
  172.     {
  173.         tmp = strtok(cmdtext, idx);
  174.         if(!strlen(tmp))
  175.         {
  176.             SendClientMessage(playerid, 0xFFFFFFAA,"Usage: /open [gate number]");
  177.             SendClientMessage(playerid, 0xFFFFFFAA,"Gates numbers: 1,2,3,4,5");
  178.             return 1;
  179.         }
  180.         new gatenumber = strval(tmp);
  181.         if(gatenumber == 1)
  182.         {
  183.            /* MoveObject(PrincipalgateL, 215.87507629,1875.56689453,13.93899250, 2.00);//closed
  184.             MoveObject(PrincipalgateR, 211.79904175,1875.57324219,13.93899250, 2.00);//closed*/
  185.             MoveObject(PrincipalgateL, 219.65823364,1875.56335449,13.93899250, 2.00);//Principal gate Open
  186.             MoveObject(PrincipalgateR, 208.04905701,1875.60437012,13.93899250, 2.00);//Principal gate Open
  187.             SendClientMessage(playerid, 0xFFFFFFAA,"You opened the gate 1");
  188.             return 1;
  189.         }
  190.         else if(gatenumber == 2)
  191.         {
  192.             MoveObject(GateXt, 297.81250000,1821.69628906,10.07812500, 2.00);//ok
  193.             MoveObject(GateXtx, 277.24218750,1821.73925781,9.82812500, 2.00);//ok
  194.             SendClientMessage(playerid, 0xFFFFFFAA,"You opened the gate 2");
  195.             return 1;
  196.         }
  197.         else if(gatenumber == 3)
  198.         {
  199.             MoveObject(MisselEntrance, 268.22851562,1863.91992188,10.00781250, 2.00);
  200.             SendClientMessage(playerid, 0xFFFFFFAA,"You opened the gate 3");
  201.             return 1;
  202.         }
  203.         else if(gatenumber == 4)
  204.         {
  205.             MoveObject(radarGate, 233.68019104,1823.38232422,8.4140625, 2.00);
  206.             SetObjectRot(radarGate, 0.00000000,0.00000000,270.00000000);
  207.             SendClientMessage(playerid, 0xFFFFFFAA,"You opened the gate 4");
  208.             return 1;
  209.         }
  210.         else if(gatenumber == 5)
  211.         {
  212.             MoveObject(DoorL, 261.95645142,1882.90307617,16.16238785, 2.00);
  213.             SetObjectRot(DoorL, 359.92858887,271.99401855,0.00000000);
  214.             MoveObject(DoorR, 275.41372681,1883.79980469,16.16238785, 2.00);
  215.             SetObjectRot(DoorR, 359.92309570,271.98852539,179.99450684);
  216.             SendClientMessage(playerid, 0xFFFFFFAA,"You opened the gate 5");
  217.             return 1;
  218.         }
  219.         return 1;
  220.     }
  221.     if (strcmp(cmd, "/close", true) == 0)
  222.     {
  223.         tmp = strtok(cmdtext, idx);
  224.         if(!strlen(tmp))
  225.         {
  226.             SendClientMessage(playerid, 0xFFFFFFAA,"Usage: /close [gate number]");
  227.             SendClientMessage(playerid, 0xFFFFFFAA,"Gates numbers: 1,2,3,4,5");
  228.             return 1;
  229.         }
  230.         new gatenumber = strval(tmp);
  231.         if(gatenumber == 1)
  232.         {
  233.            /* MoveObject(PrincipalgateL, 215.87507629,1875.56689453,13.93899250, 2.00);//closed
  234.             MoveObject(PrincipalgateR, 211.79904175,1875.57324219,13.93899250, 2.00);//closed*/
  235.             MoveObject(PrincipalgateL, 215.87507629,1875.56689453,13.93899250, 2.00);
  236.             MoveObject(PrincipalgateR, 211.79904175,1875.57324219,13.93899250, 2.00);
  237.             SendClientMessage(playerid, 0xFFFFFFAA,"You closed the gate 1");
  238.             return 1;
  239.         }
  240.         else if(gatenumber == 2)
  241.         {
  242.             MoveObject(GateXt, 297.81304932,1821.69714355,6.82812500, 2.00);
  243.             MoveObject(GateXtx, 277.24304199,1821.74011230,6.82812500, 2.00);
  244.             SendClientMessage(playerid, 0xFFFFFFAA,"You closed the gate 2");
  245.             return 1;
  246.         }
  247.         else if(gatenumber == 3)
  248.         {
  249.             MoveObject(MisselEntrance, 268.22900391,1863.92028809,7.75781250, 2.00);
  250.             SendClientMessage(playerid, 0xFFFFFFAA,"You closed the gate 3");
  251.             return 1;
  252.         }
  253.         else if(gatenumber == 4)
  254.         {
  255.             MoveObject(radarGate, 233.68019104,1823.38232422,6.41406250, 2.00);
  256.             SetObjectRot(radarGate, 0.00000000,0.00000000,270.00000000);
  257.             SendClientMessage(playerid, 0xFFFFFFAA,"You closed the gate 4");
  258.             return 1;
  259.         }
  260.         else if(gatenumber == 5)
  261.         {
  262.             MoveObject(DoorL, 266.67074585,1883.49304199,16.16238785, 2.00);//ok
  263.             SetObjectRot(DoorL, 359.92858887,271.99401855,0.00000000);
  264.             MoveObject(DoorR, 271.66687012,1883.66796875,16.16238785, 2.00);//ok
  265.             SetObjectRot(DoorR, 359.92309570,271.98852539,179.99450684);
  266.             SendClientMessage(playerid, 0xFFFFFFAA,"You closed the gate 5");
  267.             return 1;
  268.         }
  269.         return 1;
  270.     }
  271.     return 0;
  272. }
  273. public OpelAll()
  274. {
  275.     MoveObject(DoorL, 266.67074585,1883.49304199,16.16238785, 2.00);//ok
  276.     SetObjectRot(DoorL, 359.92858887,271.99401855,0.00000000);
  277.     MoveObject(DoorR, 271.66687012,1883.66796875,16.16238785, 2.00);//ok
  278.     SetObjectRot(DoorR, 359.92309570,271.98852539,179.99450684);
  279.     MoveObject(GateXt, 297.81250000,1821.69628906,10.07812500, 2.00);//ok
  280.     MoveObject(GateXtx, 277.24218750,1821.73925781,9.82812500, 2.00);//ok
  281.     MoveObject(PrincipalgateL, 219.65823364,1875.56335449,13.93899250, 2.00);
  282.     MoveObject(PrincipalgateR, 208.04905701,1875.60437012,13.93899250, 2.00);
  283.     MoveObject(MisselEntrance, 268.22851562,1863.91992188,10.00781250, 2.00);
  284.     MoveObject(radarGate, 233.68019104,1823.38232422,8.4140625, 2.00);
  285.     SetObjectRot(radarGate, 0.00000000,0.00000000,270.00000000);
  286.     DestroyObject(ligth2);
  287.     DestroyObject(ligth1);
  288.     //DestroyObject(rocket);
  289.     //rocket = CreateObject(17050,268.78613281,1883.78320312,-31.09375000,0.00000000,0.00000000,0.00000000); //foguete
  290.     return 1;
  291. }
  292. public ResetMissel()
  293. {
  294.     DestroyObject(rocket);
  295.     rocket = CreateObject(17050,268.78613281,1883.78320312,-31.09375000,0.00000000,0.00000000,0.00000000); //foguete
  296.     return 1;
  297. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement