Guest User

Kembang Api Sistem

a guest
Apr 21st, 2014
1,099
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 78.32 KB | None | 0 0
  1. /*
  2. ////////////////////////////////////////////////////////////////////////////////
  3. ///////////////////////  __   _  _  _   _        _     /////////////////////////
  4. //////////////////////  |  _ |_ | \/ | | | |\ | | |   //////////////////////////
  5. /////////////////////   \__/ |_ |_||_| |_| | \| |_|  ///////////////////////////
  6. ////////////////////                                ////////////////////////////
  7. ////////////////////////////////////////////////////////////////////////////////
  8.  
  9. */
  10. #include <a_samp>
  11. #include <djson>
  12. #define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
  13. #define COLOR_TAN 0xBDB76BAA
  14. #define RED         0xE60000FF
  15. #define WHITE       0xFFFFFFFF
  16. #define MAX_LIGHTS 100
  17. #define MAX_PARTS 13
  18. #define Sprinkleid 52
  19. #define RBSprinkleid 20
  20.  
  21. //dialog id's
  22.  
  23. #define FWCPM 500
  24. #define FWCPDD 501
  25. #define FWCPFC 502
  26. #define FWCPFR1 503
  27. #define FWCPFR2 504
  28. #define FWCPCR 505
  29. #define FWCPFT1 506
  30. #define FWCPFT2 507
  31. #define FWCPFT3 508
  32. #define FWCPRB 509
  33.  
  34. new Float:FRX[MAX_PLAYERS], Float:FRY[MAX_PLAYERS], Float:FRZ[MAX_PLAYERS];
  35. new Float:FTX[MAX_PLAYERS], Float:FTY[MAX_PLAYERS], Float:FTZ[MAX_PLAYERS];
  36. new Float:RBX[MAX_PLAYERS], Float:RBY[MAX_PLAYERS], Float:RBZ[MAX_PLAYERS];
  37. new firecrackertime[MAX_PLAYERS];
  38. new firerockettime[MAX_PLAYERS];
  39. new explosionrocket[MAX_PLAYERS];
  40. new Firecracker[MAX_PLAYERS];
  41. new Firerocket[MAX_PLAYERS];
  42. new rocketsmoke[MAX_PLAYERS];
  43. new FireCrackerRoll[MAX_PLAYERS];
  44. new firecrackerroll[MAX_PLAYERS];
  45. new CrackerRollSmoke[MAX_PLAYERS];
  46. new Float:RollStartX[MAX_PLAYERS], Float:RollStartY[MAX_PLAYERS], Float:RollStartZ[MAX_PLAYERS];
  47.  
  48. new RocketBoxTime[MAX_PLAYERS];
  49. new RocketBox[MAX_PLAYERS];
  50. new RocketBoxSmoke[MAX_PLAYERS];
  51.  
  52. new FountainSmoke[MAX_PLAYERS];
  53. new Fountain[MAX_PLAYERS];
  54.  
  55. new Light[MAX_LIGHTS][MAX_PLAYERS];
  56. new RollParts[MAX_PLAYERS][MAX_PARTS];
  57. new FountainSprinkle[Sprinkleid][MAX_PLAYERS];
  58.  
  59. new RocketBoxSprinkle[RBSprinkleid][MAX_PLAYERS];
  60. new RBLight[MAX_LIGHTS][MAX_PLAYERS];
  61.  
  62. new Fountain1Time[MAX_PLAYERS];
  63. new Fountain2Time[MAX_PLAYERS];
  64. new Fountain3Time[MAX_PLAYERS];
  65. new DestroySprinkleID[MAX_PLAYERS];
  66.  
  67. new DrawDistanceWord[][32] =
  68. {
  69.     {"Low"},
  70.     {"Medium"},
  71.     {"High"}
  72. };
  73.  
  74. new UsageFW[][32] =
  75. {
  76.     {"All"},
  77.     {"Rcon Only"}
  78. };
  79.  
  80. enum FWN
  81. {
  82.     FireCracker,
  83.     Firerocket1,
  84.     Firerocket2,
  85.     Crackerroll,
  86.     Fountain1,
  87.     Fountain2,
  88.     Fountain3,
  89.     RocketB,
  90.     DrawDistance,
  91. };
  92. new AllowedFirework[FWN];
  93.  
  94. forward LoadFireWorkInfo();
  95. forward SaveFireWorkInfo();
  96. forward FirecrackerTime(playerid);
  97. forward CrackerRollTime(playerid);
  98. forward FirerocketTime(playerid);
  99. forward splittime(playerid);
  100. forward splittime2(playerid);
  101. forward splittime3(playerid);
  102. forward lighttimer(playerid);
  103. forward lighttimer2(playerid);
  104. forward CreateRoll(Rollid, Float:X, Float:Y, Float:Z);
  105. forward DestroyRoll(Rollid);
  106. forward FountainTimer(playerid);
  107. forward Destroy1Sprinkle(playerid);
  108. forward Destroy3Sprinkle(playerid);
  109. forward LastSprinkles(playerid);
  110. forward RocketBoxTimer(playerid);
  111. forward SplitRBSprinkle(lightobject, playerid);
  112. forward DestroyRBLight(playerid);
  113.  
  114. stock ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
  115. {
  116.     if(IsPlayerConnected(playerid))
  117.     {
  118.         new Float:posx, Float:posy, Float:posz;
  119.         new Float:oldposx, Float:oldposy, Float:oldposz;
  120.         new Float:tempposx, Float:tempposy, Float:tempposz;
  121.         GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  122.         //radi = 2.0; //Trigger Radius
  123.         for(new i = 0; i < MAX_PLAYERS; i++)
  124.         {
  125.             if(IsPlayerConnected(i))
  126.             {
  127.                 if(IsPlayerConnected(i))
  128.                 {
  129.                     GetPlayerPos(i, posx, posy, posz);
  130.                     tempposx = (oldposx -posx);
  131.                     tempposy = (oldposy -posy);
  132.                     tempposz = (oldposz -posz);
  133.                     //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
  134.                     if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
  135.                     {
  136.                         SendClientMessage(i, col1, string);
  137.                     }
  138.                     else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
  139.                     {
  140.                         SendClientMessage(i, col2, string);
  141.                     }
  142.                     else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
  143.                     {
  144.                         SendClientMessage(i, col3, string);
  145.                     }
  146.                     else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
  147.                     {
  148.                         SendClientMessage(i, col4, string);
  149.                     }
  150.                     else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  151.                     {
  152.                         SendClientMessage(i, col5, string);
  153.                     }
  154.                 }
  155.                 else
  156.                 {
  157.                     SendClientMessage(i, col1, string);
  158.                 }
  159.             }
  160.         }
  161.     }//not connected
  162.     return 1;
  163. }
  164.  
  165. stock Float:GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
  166. {
  167.     new Float:a;
  168.     GetPlayerPos(playerid, x, y, a);
  169.     if (IsPlayerInAnyVehicle(playerid))
  170.         GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
  171.     else
  172.         GetPlayerFacingAngle(playerid, a);
  173.     x += (distance * floatsin(-a, degrees));
  174.     y += (distance * floatcos(-a, degrees));
  175.     return a;
  176. }
  177.  
  178. public LoadFireWorkInfo()
  179. {
  180.     new file[128];
  181.     format(file, sizeof(file), "FireWorkInfo");
  182.     if(fexist(file))
  183.     {
  184.         AllowedFirework[FireCracker] = djInt(file,"FireCrackerAL");
  185.         AllowedFirework[Firerocket1] = djInt(file,"FireRocket1AL");
  186.         AllowedFirework[Firerocket2] = djInt(file,"FireRocket2AL");
  187.         AllowedFirework[Crackerroll] = djInt(file,"CrackerrollAL");
  188.         AllowedFirework[Fountain1] = djInt(file,"Fountain1AL");
  189.         AllowedFirework[Fountain2] = djInt(file,"Fountain2AL");
  190.         AllowedFirework[Fountain3] = djInt(file,"Fountain3AL");
  191.         AllowedFirework[RocketB] = djInt(file,"RocketBAL");
  192.         AllowedFirework[DrawDistance] = djInt(file,"DrawDistance");
  193.         print("[NotimeBot]: FireWorkInfo has succesfully loaded");
  194.         return 1;
  195.     }
  196.     else return print("[NotimeBot]: An error has occupied while loading the FireWorkInfo, no such file found");
  197. }
  198.  
  199. public SaveFireWorkInfo()
  200. {
  201.     new file[128];
  202.     format(file, sizeof(file), "FireWorkInfo");
  203.     if(fexist(file))
  204.     {
  205.         djSetInt(file,"FireCrackerAL", AllowedFirework[FireCracker]);
  206.         djSetInt(file,"FireRocket1AL", AllowedFirework[Firerocket1]);
  207.         djSetInt(file,"FireRocket2AL", AllowedFirework[Firerocket2]);
  208.         djSetInt(file,"CrackerrollAL", AllowedFirework[Crackerroll]);
  209.         djSetInt(file,"Fountain1AL", AllowedFirework[Fountain1]);
  210.         djSetInt(file,"Fountain2AL", AllowedFirework[Fountain2]);
  211.         djSetInt(file,"Fountain3AL", AllowedFirework[Fountain3]);
  212.         djSetInt(file,"RocketBAL", AllowedFirework[RocketB]);
  213.         djSetInt(file,"DrawDistance", AllowedFirework[DrawDistance]);
  214.         print("[NotimeBot]: FireWorkInfo has succesfully saved");
  215.         return 1;
  216.     }
  217.     else return print("[NotimeBot]: An error has occupied while loading the FireWorkInfo, no such file found");
  218. }
  219.  
  220. public SplitRBSprinkle(lightobject, playerid)
  221. {
  222.     new Float:X, Float:Y, Float:Z;
  223.     GetObjectPos(RocketBoxSprinkle[RocketBoxTime[playerid]][playerid], X, Y, Z);
  224.     CreateExplosion(X, Y, Z, 2, 0);
  225.     DestroyObject(RocketBoxSprinkle[RocketBoxTime[playerid]][playerid]);
  226.     RBLight[1][playerid] = CreateObject(lightobject, X, Y, Z, 0, 0, 0);
  227.     MoveObject(RBLight[1][playerid], (X-(0+(random(8)))), (Y-(0+(random(8)))), (Z-25), (2+(random(4))));
  228.     RBLight[2][playerid] = CreateObject(lightobject, X, Y, Z, 0, 0, 0);
  229.     MoveObject(RBLight[2][playerid], (X+(0+(random(8)))), (Y+(0+(random(8)))), (Z-25), (2+(random(4))));
  230.     RBLight[3][playerid] = CreateObject(lightobject, X, Y, Z, 0, 0, 0);
  231.     MoveObject(RBLight[3][playerid], (X-(0+(random(8)))), (Y+(0+(random(8)))), (Z-25), (2+(random(4))));
  232.     RBLight[4][playerid] = CreateObject(lightobject, X, Y, Z, 0, 0, 0);
  233.     MoveObject(RBLight[4][playerid], (X+(0+(random(8)))), (Y-(0+(random(8)))), (Z-25), (2+(random(4))));
  234.     SetTimerEx("DestroyRBLight", 2600, 0, "i", playerid);
  235.     return 1;
  236. }
  237.  
  238. public DestroyRBLight(playerid)
  239. {
  240.     DestroyObject(RBLight[1][playerid]);
  241.     DestroyObject(RBLight[2][playerid]);
  242.     DestroyObject(RBLight[3][playerid]);
  243.     DestroyObject(RBLight[4][playerid]);
  244.     RocketBoxTime[playerid] = RocketBoxTime[playerid]+1;
  245.     RocketBoxTimer(playerid);
  246.     return 1;
  247. }
  248.  
  249. public RocketBoxTimer(playerid)
  250. {
  251.     if(RocketBoxTime[playerid] == 11)
  252.     {
  253.         RocketBoxTime[playerid] = 0;
  254.         DestroyObject(RocketBox[playerid]);
  255.         DestroyObject(RocketBoxSmoke[playerid]);
  256.         return 1;
  257.     }
  258.     if(RocketBoxTime[playerid] >= 1)
  259.     {
  260.         new LightObject;
  261.         switch(random(2))
  262.         {
  263.             case 0:
  264.             {
  265.                 LightObject = 354;
  266.             }
  267.             case 1:
  268.             {
  269.                 LightObject = 1213;
  270.             }
  271.         }
  272.         RocketBoxSprinkle[RocketBoxTime[playerid]][playerid] = CreateObject(LightObject, RBX[playerid], RBY[playerid], RBZ[playerid], 0, 0, 0);
  273.         MoveObject(RocketBoxSprinkle[RocketBoxTime[playerid]][playerid], RBX[playerid], RBY[playerid], (RBZ[playerid]+35), 20);
  274.         SetTimerEx("SplitRBSprinkle", 1500, 0, "ii",LightObject, playerid);
  275.         return 1;
  276.     }
  277.     return 1;
  278. }
  279.  
  280. public Destroy1Sprinkle(playerid)
  281. {
  282.     if(DestroySprinkleID[playerid] >= 50)
  283.     {
  284.         new x;
  285.         for (x=0;x<Sprinkleid;x++)
  286.         {
  287.             DestroyObject(FountainSprinkle[x][playerid]);
  288.         }
  289.         return 1;
  290.     }
  291.     if(DestroySprinkleID[playerid] >= 0)
  292.     {
  293.         DestroyObject(FountainSprinkle[DestroySprinkleID[playerid]][playerid]);
  294.         DestroySprinkleID[playerid] = DestroySprinkleID[playerid]+1;
  295.         return 1;
  296.     }
  297.     return 1;
  298. }
  299.  
  300. public Destroy3Sprinkle(playerid)
  301. {
  302.     if(DestroySprinkleID[playerid] >= 50)
  303.     {
  304.         new x;
  305.         for (x=0;x<Sprinkleid;x++)
  306.         {
  307.             DestroyObject(FountainSprinkle[x][playerid]);
  308.         }
  309.         return 1;
  310.     }
  311.     if(DestroySprinkleID[playerid] >= 0)
  312.     {
  313.         new Float:X, Float:Y, Float:Z;
  314.         GetObjectPos(FountainSprinkle[DestroySprinkleID[playerid]][playerid] ,X, Y, Z);
  315.         CreateExplosion(X, Y, Z, 12, 0);
  316.         DestroyObject(FountainSprinkle[DestroySprinkleID[playerid]][playerid]);
  317.         DestroySprinkleID[playerid] = DestroySprinkleID[playerid]+1;
  318.         return 1;
  319.     }
  320.     return 1;
  321. }
  322.  
  323. public LastSprinkles(playerid)
  324. {
  325.     Fountain1Time[playerid] = 0;
  326.     Fountain2Time[playerid] = 0;
  327.     Fountain3Time[playerid] = 0;
  328.     DestroySprinkleID[playerid] = 0;
  329.     return 1;
  330. }
  331.  
  332. public FountainTimer(playerid)
  333. {
  334.     if(Fountain1Time[playerid] >= 50)
  335.     {
  336.         DestroyObject(Fountain[playerid]);
  337.         DestroyObject(FountainSmoke[playerid]);
  338.         SetTimerEx("Destroy1Sprinkle", 300, 0, "i",playerid);
  339.         SetTimerEx("LastSprinkles", 600, 0, "i", playerid);
  340.         return 1;
  341.     }
  342.     if(Fountain1Time[playerid] >= 1)
  343.     {
  344.         new Float:RandomXPos;
  345.         new Float:RandomYPos;
  346.         switch(random(2))
  347.         {
  348.             case 0:
  349.             {
  350.                 RandomXPos = -(random(4));
  351.             }
  352.             case 1:
  353.             {
  354.                 RandomXPos = (random(4));
  355.             }
  356.         }
  357.         switch(random(2))
  358.         {
  359.             case 0:
  360.             {
  361.                 RandomYPos = -(random(4));
  362.             }
  363.             case 1:
  364.             {
  365.                 RandomYPos = (random(4));
  366.             }
  367.         }
  368.         FountainSprinkle[Fountain1Time[playerid]][playerid] = CreateObject(354, FTX[playerid], FTY[playerid], FTZ[playerid], 0, 0, 0);
  369.         MoveObject(FountainSprinkle[Fountain1Time[playerid]][playerid], (FTX[playerid]+RandomXPos), (FTY[playerid]+RandomYPos), (FTZ[playerid]+8), 30);
  370.         Fountain1Time[playerid] = Fountain1Time[playerid]+1;
  371.         SetTimerEx("Destroy1Sprinkle", 300, 0, "i",playerid);
  372.         SetTimerEx("FountainTimer", (100+(random(200))), 0, "i",playerid);
  373.         return 1;
  374.     }
  375.     if(Fountain2Time[playerid] >= 50)
  376.     {
  377.         DestroyObject(Fountain[playerid]);
  378.         DestroyObject(FountainSmoke[playerid]);
  379.         SetTimerEx("Destroy1Sprinkle", 300, 0, "i",playerid);
  380.         SetTimerEx("LastSprinkles", 600, 0, "i", playerid);
  381.         return 1;
  382.     }
  383.     if(Fountain2Time[playerid] >= 1)
  384.     {
  385.         new Float:RandomXPos;
  386.         new Float:RandomYPos;
  387.         switch(random(2))
  388.         {
  389.             case 0:
  390.             {
  391.                 RandomXPos = -(random(4));
  392.             }
  393.             case 1:
  394.             {
  395.                 RandomXPos = (random(4));
  396.             }
  397.         }
  398.         switch(random(2))
  399.         {
  400.             case 0:
  401.             {
  402.                 RandomYPos = -(random(4));
  403.             }
  404.             case 1:
  405.             {
  406.                 RandomYPos = (random(4));
  407.             }
  408.         }
  409.         FountainSprinkle[Fountain2Time[playerid]][playerid] = CreateObject(1213, FTX[playerid], FTY[playerid], FTZ[playerid], 0, 0, 0);
  410.         MoveObject(FountainSprinkle[Fountain2Time[playerid]][playerid], (FTX[playerid]+RandomXPos), (FTY[playerid]+RandomYPos), (FTZ[playerid]+8), 30);
  411.         Fountain2Time[playerid] = Fountain2Time[playerid]+1;
  412.         SetTimerEx("Destroy1Sprinkle", 300, 0, "i",playerid);
  413.         SetTimerEx("FountainTimer", (100+(random(200))), 0, "i",playerid);
  414.         return 1;
  415.     }
  416.     if(Fountain3Time[playerid] >= 50)
  417.     {
  418.         DestroyObject(Fountain[playerid]);
  419.         DestroyObject(FountainSmoke[playerid]);
  420.         SetTimerEx("Destroy3Sprinkle", 300, 0, "i",playerid);
  421.         SetTimerEx("LastSprinkles", 600, 0, "i", playerid);
  422.         return 1;
  423.     }
  424.     if(Fountain3Time[playerid] >= 1)
  425.     {
  426.         new Float:RandomXPos;
  427.         new Float:RandomYPos;
  428.         new RandomLight;
  429.         switch(random(2))
  430.         {
  431.             case 0:
  432.             {
  433.                 RandomXPos = -(random(4));
  434.             }
  435.             case 1:
  436.             {
  437.                 RandomXPos = (random(4));
  438.             }
  439.         }
  440.         switch(random(2))
  441.         {
  442.             case 0:
  443.             {
  444.                 RandomYPos = -(random(4));
  445.             }
  446.             case 1:
  447.             {
  448.                 RandomYPos = (random(4));
  449.             }
  450.         }
  451.         switch(random(2))
  452.         {
  453.             case 0:
  454.             {
  455.                 RandomLight = 354;
  456.             }
  457.             case 1:
  458.             {
  459.                 RandomLight = 1213;
  460.             }
  461.         }
  462.         FountainSprinkle[Fountain3Time[playerid]][playerid] = CreateObject(RandomLight, FTX[playerid], FTY[playerid], FTZ[playerid], 0, 0, 0);
  463.         MoveObject(FountainSprinkle[Fountain3Time[playerid]][playerid], (FTX[playerid]+RandomXPos), (FTY[playerid]+RandomYPos), (FTZ[playerid]+8), 30);
  464.         Fountain3Time[playerid] = Fountain3Time[playerid]+1;
  465.         SetTimerEx("Destroy3Sprinkle", 300, 0, "i",playerid);
  466.         SetTimerEx("FountainTimer", (100+(random(200))), 0, "i",playerid);
  467.         return 1;
  468.     }
  469.     return 1;
  470. }
  471.  
  472. public CreateRoll(Rollid, Float:X, Float:Y, Float:Z)
  473. {
  474.     RollParts[Rollid][1] = CreateObject(1654,X,Y,Z, 90, 90, 0);
  475.     RollParts[Rollid][2] = CreateObject(1654,(X+0.25),Y,Z, 90, 90, 0);
  476.     RollParts[Rollid][3] = CreateObject(1654,(X+0.50),Y,Z, 90, 90, 0);
  477.     RollParts[Rollid][4] = CreateObject(1654,(X+0.75),Y,Z, 90, 90, 0);
  478.     RollParts[Rollid][5] = CreateObject(1654,(X+1.00),Y,Z, 90, 90, 0);
  479.     RollParts[Rollid][6] = CreateObject(1654,(X+1.25),Y,Z, 90, 90, 0);
  480.     RollParts[Rollid][7] = CreateObject(1654,X,(Y+0.1),Z, 90, 90, 0);
  481.     RollParts[Rollid][8] = CreateObject(1654,(X+0.25),(Y+0.1),Z, 90, 90, 0);
  482.     RollParts[Rollid][9] = CreateObject(1654,(X+0.50),(Y+0.1),Z, 90, 90, 0);
  483.     RollParts[Rollid][10] = CreateObject(1654,(X+0.75),(Y+0.1),Z, 90, 90, 0);
  484.     RollParts[Rollid][11] = CreateObject(1654,(X+1.00),(Y+0.1),Z, 90, 90, 0);
  485.     RollParts[Rollid][12] = CreateObject(1654,(X+1.25),(Y+0.1),Z, 90, 90, 0);
  486.     return 1;
  487. }
  488.  
  489. public DestroyRoll(Rollid)
  490. {
  491.     DestroyObject(RollParts[Rollid][1]);
  492.     DestroyObject(RollParts[Rollid][2]);
  493.     DestroyObject(RollParts[Rollid][3]);
  494.     DestroyObject(RollParts[Rollid][4]);
  495.     DestroyObject(RollParts[Rollid][5]);
  496.     DestroyObject(RollParts[Rollid][6]);
  497.     DestroyObject(RollParts[Rollid][7]);
  498.     DestroyObject(RollParts[Rollid][8]);
  499.     DestroyObject(RollParts[Rollid][9]);
  500.     DestroyObject(RollParts[Rollid][10]);
  501.     DestroyObject(RollParts[Rollid][11]);
  502.     DestroyObject(RollParts[Rollid][12]);
  503.     return 1;
  504. }
  505.  
  506. public CrackerRollTime(playerid)
  507. {
  508.     if(firecrackerroll[playerid] == 1)
  509.     {
  510.         DestroyObject(CrackerRollSmoke[playerid]);
  511.     }
  512.     if(firecrackerroll[playerid] == 49)
  513.     {
  514.         firecrackerroll[playerid] = 0;
  515.         DestroyRoll(playerid);
  516.         return 1;
  517.     }
  518.     if(firecrackerroll[playerid] >= 1)
  519.     {
  520.         new Float:X, Float:Y, Float:Z;
  521.         if(firecrackerroll[playerid] >= 1 && firecrackerroll[playerid] <= 4)
  522.         {
  523.             GetObjectPos(RollParts[playerid][1], X, Y, Z);
  524.             DestroyRoll(playerid);
  525.             CreateExplosion(X, Y, Z, 12, 0);
  526.             CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
  527.             firecrackerroll[playerid] = firecrackerroll[playerid]+1;
  528.             SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
  529.             return 1;
  530.         }
  531.         if(firecrackerroll[playerid] >= 5 && firecrackerroll[playerid] <= 8)
  532.         {
  533.             GetObjectPos(RollParts[playerid][2], X, Y, Z);
  534.             DestroyRoll(playerid);
  535.             CreateExplosion(X, Y, Z, 12, 0);
  536.             CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
  537.             firecrackerroll[playerid] = firecrackerroll[playerid]+1;
  538.             SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
  539.             return 1;
  540.         }
  541.         if(firecrackerroll[playerid] >= 9 && firecrackerroll[playerid] <= 12)
  542.         {
  543.             GetObjectPos(RollParts[playerid][3], X, Y, Z);
  544.             DestroyRoll(playerid);
  545.             CreateExplosion(X, Y, Z, 12, 0);
  546.             CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
  547.             firecrackerroll[playerid] = firecrackerroll[playerid]+1;
  548.             SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
  549.             return 1;
  550.         }
  551.         if(firecrackerroll[playerid] >= 13 && firecrackerroll[playerid] <= 16)
  552.         {
  553.             GetObjectPos(RollParts[playerid][4], X, Y, Z);
  554.             DestroyRoll(playerid);
  555.             CreateExplosion(X, Y, Z, 12, 0);
  556.             CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
  557.             firecrackerroll[playerid] = firecrackerroll[playerid]+1;
  558.             SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
  559.             return 1;
  560.         }
  561.         if(firecrackerroll[playerid] >= 17 && firecrackerroll[playerid] <= 20)
  562.         {
  563.             GetObjectPos(RollParts[playerid][5], X, Y, Z);
  564.             DestroyRoll(playerid);
  565.             CreateExplosion(X, Y, Z, 12, 0);
  566.             CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
  567.             firecrackerroll[playerid] = firecrackerroll[playerid]+1;
  568.             SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
  569.             return 1;
  570.         }
  571.         if(firecrackerroll[playerid] >= 21 && firecrackerroll[playerid] <= 24)
  572.         {
  573.             GetObjectPos(RollParts[playerid][6], X, Y, Z);
  574.             DestroyRoll(playerid);
  575.             CreateExplosion(X, Y, Z, 12, 0);
  576.             CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
  577.             firecrackerroll[playerid] = firecrackerroll[playerid]+1;
  578.             SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
  579.             return 1;
  580.         }
  581.         if(firecrackerroll[playerid] >= 25 && firecrackerroll[playerid] <= 28)
  582.         {
  583.             GetObjectPos(RollParts[playerid][12], X, Y, Z);
  584.             DestroyRoll(playerid);
  585.             CreateExplosion(X, Y, Z, 12, 0);
  586.             CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
  587.             firecrackerroll[playerid] = firecrackerroll[playerid]+1;
  588.             SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
  589.             return 1;
  590.         }
  591.         if(firecrackerroll[playerid] >= 29 && firecrackerroll[playerid] <= 32)
  592.         {
  593.             GetObjectPos(RollParts[playerid][11], X, Y, Z);
  594.             DestroyRoll(playerid);
  595.             CreateExplosion(X, Y, Z, 12, 0);
  596.             CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
  597.             firecrackerroll[playerid] = firecrackerroll[playerid]+1;
  598.             SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
  599.             return 1;
  600.         }
  601.         if(firecrackerroll[playerid] >= 33 && firecrackerroll[playerid] <= 36)
  602.         {
  603.             GetObjectPos(RollParts[playerid][10], X, Y, Z);
  604.             DestroyRoll(playerid);
  605.             CreateExplosion(X, Y, Z, 12, 0);
  606.             CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
  607.             firecrackerroll[playerid] = firecrackerroll[playerid]+1;
  608.             SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
  609.             return 1;
  610.         }
  611.         if(firecrackerroll[playerid] >= 37 && firecrackerroll[playerid] <= 40)
  612.         {
  613.             GetObjectPos(RollParts[playerid][9], X, Y, Z);
  614.             DestroyRoll(playerid);
  615.             CreateExplosion(X, Y, Z, 12, 0);
  616.             CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
  617.             firecrackerroll[playerid] = firecrackerroll[playerid]+1;
  618.             SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
  619.             return 1;
  620.         }
  621.         if(firecrackerroll[playerid] >= 41 && firecrackerroll[playerid] <= 44)
  622.         {
  623.             GetObjectPos(RollParts[playerid][8], X, Y, Z);
  624.             DestroyRoll(playerid);
  625.             CreateExplosion(X, Y, Z, 12, 0);
  626.             CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
  627.             firecrackerroll[playerid] = firecrackerroll[playerid]+1;
  628.             SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
  629.             return 1;
  630.         }
  631.         if(firecrackerroll[playerid] >= 45 && firecrackerroll[playerid] <= 48)
  632.         {
  633.             GetObjectPos(RollParts[playerid][7], X, Y, Z);
  634.             DestroyRoll(playerid);
  635.             CreateExplosion(X, Y, Z, 12, 0);
  636.             CreateRoll(playerid, RollStartX[playerid], RollStartY[playerid], RollStartZ[playerid]);
  637.             firecrackerroll[playerid] = firecrackerroll[playerid]+1;
  638.             SetTimerEx("CrackerRollTime", (100+(random(200))), 0, "i", playerid);
  639.             return 1;
  640.         }
  641.         return 1;
  642.     }
  643.     return 1;
  644. }
  645.  
  646. public FirecrackerTime(playerid)
  647. {
  648.     if(firecrackertime[playerid] == 1)
  649.     {
  650.         new Float:X, Float:Y,Float:Z;
  651.         GetObjectPos(Firecracker[playerid], X, Y, Z);
  652.         CreateExplosion(X,Y,Z, 12, 0);
  653.         DestroyObject(Firecracker[playerid]);
  654.         firecrackertime[playerid] = 0;
  655.         return 1;
  656.     }
  657.     return 1;
  658. }
  659.  
  660. public FirerocketTime(playerid)
  661. {
  662.     if(firerockettime[playerid] == 1)
  663.     {
  664.         GetObjectPos(Firerocket[playerid], FRX[playerid], FRY[playerid], FRZ[playerid]);
  665.         explosionrocket[playerid] = CreateExplosion(FRX[playerid], FRY[playerid], FRZ[playerid], 6, 0);
  666.         SetTimerEx("splittime", 500, 0, "i", playerid);
  667.         return 1;
  668.     }
  669.     if(firerockettime[playerid] == 2)
  670.     {
  671.         GetObjectPos(Firerocket[playerid], FRX[playerid], FRY[playerid], FRZ[playerid]);
  672.         explosionrocket[playerid] = CreateExplosion(FRX[playerid], FRY[playerid], FRZ[playerid], 6, 0);
  673.         SetTimerEx("splittime2", 100, 0, "i", playerid);
  674.         return 1;
  675.     }
  676.     return 1;
  677. }
  678.  
  679. public splittime(playerid)
  680. {
  681.     if(firerockettime[playerid] == 1)
  682.     {
  683.         CreateExplosion(FRX[playerid]-(0+(random(3))),FRY[playerid]-(0+(random(3))),FRZ[playerid]-(0+(random(3))), 4, 0);
  684.         CreateExplosion(FRX[playerid]-(0+(random(3))),FRY[playerid]+(0+(random(3))),FRZ[playerid]-(0+(random(3))), 4, 0);
  685.         CreateExplosion(FRX[playerid]-(0+(random(3))),FRY[playerid],FRZ[playerid]-(0+(random(3))), 4, 0);
  686.         CreateExplosion(FRX[playerid]+(0+(random(3))),FRY[playerid]-(0+(random(3))),FRZ[playerid]-(0+(random(3))), 4, 0);
  687.         CreateExplosion(FRX[playerid]+(0+(random(3))),FRY[playerid]+(0+(random(3))),FRZ[playerid]-(0+(random(3))), 4, 0);
  688.         CreateExplosion(FRX[playerid]+(0+(random(3))),FRY[playerid],FRZ[playerid]-(0+(random(3))), 4, 0);
  689.         CreateExplosion(FRX[playerid],FRY[playerid]-(0+(random(3))),FRZ[playerid]-(0+(random(3))), 4, 0);
  690.         CreateExplosion(FRX[playerid],FRY[playerid]+(0+(random(3))),FRZ[playerid]-(0+(random(3))), 4, 0);
  691.         Light[1][playerid] = CreateObject(354,FRX[playerid]-(0+(random(6))),FRY[playerid]-(0+(random(6))),FRZ[playerid]+(0+(random(6))), 0, 0,0);
  692.         Light[2][playerid] = CreateObject(354,FRX[playerid]-(0+(random(6))),FRY[playerid],FRZ[playerid]+(0+(random(6))), 0, 0,0);
  693.         Light[3][playerid] = CreateObject(354,FRX[playerid]-(0+(random(6))),FRY[playerid],FRZ[playerid]-(0+(random(6))), 0, 0,0);
  694.         Light[4][playerid] = CreateObject(354,FRX[playerid]-(0+(random(6))),FRY[playerid]-(0+(random(6))),FRZ[playerid]+(0+(random(6))), 0, 0,0);
  695.         Light[5][playerid] = CreateObject(354,FRX[playerid]-(0+(random(6))),FRY[playerid]+(0+(random(6))),FRZ[playerid]+(0+(random(6))), 0, 0,0);
  696.         Light[6][playerid] = CreateObject(354,FRX[playerid]-(0+(random(6))),FRY[playerid],FRZ[playerid]-(0+(random(6))), 0, 0,0);
  697.         Light[7][playerid] = CreateObject(354,FRX[playerid]-(0+(random(6))),FRY[playerid]-(0+(random(6))),FRZ[playerid]-(0+(random(6))), 0, 0,0);
  698.         Light[8][playerid] = CreateObject(354,FRX[playerid],FRY[playerid]-(0+(random(6))),FRZ[playerid]+(0+(random(6))), 0, 0,0);
  699.         new Float:X,Float:Y,Float:Z;
  700.         GetObjectPos(Light[1][playerid], X, Y, Z);
  701.         MoveObject(Light[1][playerid], X-(0+(random(6))), Y-(0+(random(6))), Z-20, 6);
  702.         GetObjectPos(Light[2][playerid], X, Y, Z);
  703.         MoveObject(Light[2][playerid], X-(0+(random(6))), Y+(0+(random(6))), Z-20, 5);
  704.         GetObjectPos(Light[3][playerid], X, Y, Z);
  705.         MoveObject(Light[3][playerid], X-(0+(random(6))), Y, Z-20, 4);
  706.         GetObjectPos(Light[4][playerid], X, Y, Z);
  707.         MoveObject(Light[4][playerid], X+(0+(random(6))), Y-(0+(random(6))), Z-20, 5);
  708.         GetObjectPos(Light[5][playerid], X, Y, Z);
  709.         MoveObject(Light[5][playerid], X+(0+(random(6))), Y+(0+(random(6))), Z-20, 5);
  710.         GetObjectPos(Light[6][playerid], X, Y, Z);
  711.         MoveObject(Light[6][playerid], X+(0+(random(6))), Y, Z-20, 4);
  712.         GetObjectPos(Light[7][playerid], X, Y, Z);
  713.         MoveObject(Light[7][playerid], X, Y-(0+(random(6))), Z-20, 6);
  714.         GetObjectPos(Light[8][playerid], X, Y, Z);
  715.         MoveObject(Light[8][playerid], X, Y+(0+(random(6))), Z-20, 5);
  716.         SetTimerEx("lighttimer", 3900, 0, "i", playerid);
  717.         DestroyObject(Firerocket[playerid]);
  718.         DestroyObject(rocketsmoke[playerid]);
  719.         return 1;
  720.     }
  721.     return 1;
  722. }
  723.  
  724. public splittime2(playerid)
  725. {
  726.     if(firerockettime[playerid] == 2)
  727.     {
  728.         CreateExplosion(FRX[playerid]-(0+(random(10))),FRY[playerid]-(0+(random(10))),FRZ[playerid]-5, 6, 0);
  729.         CreateExplosion(FRX[playerid]-(0+(random(10))),FRY[playerid]+(0+(random(10))),FRZ[playerid]-5, 6, 0);
  730.         CreateExplosion(FRX[playerid]-(0+(random(10))),FRY[playerid],FRZ[playerid]-5, 6, 0);
  731.         CreateExplosion(FRX[playerid]+(0+(random(10))),FRY[playerid]-(0+(random(10))),FRZ[playerid]-5, 6, 0);
  732.         CreateExplosion(FRX[playerid]+(0+(random(10))),FRY[playerid]+(0+(random(10))),FRZ[playerid]-5, 6, 0);
  733.         CreateExplosion(FRX[playerid]+(0+(random(10))),FRY[playerid],FRZ[playerid]-5, 6, 0);
  734.         CreateExplosion(FRX[playerid],FRY[playerid]-(0+(random(10))),FRZ[playerid]-5, 6, 0);
  735.         CreateExplosion(FRX[playerid],FRY[playerid]+(0+(random(10))),FRZ[playerid]-5, 6, 0);
  736.         Light[1][playerid] = CreateObject(354,FRX[playerid]-(0+(random(10))),FRY[playerid]-(0+(random(10))),FRZ[playerid]-5, 0, 0,0);
  737.         Light[2][playerid] = CreateObject(354,FRX[playerid]-(0+(random(10))),FRY[playerid]+(0+(random(10))),FRZ[playerid]-5, 0, 0,0);
  738.         Light[3][playerid] = CreateObject(354,FRX[playerid]-(0+(random(10))),FRY[playerid],FRZ[playerid]-5, 0, 0,0);
  739.         Light[4][playerid] = CreateObject(354,FRX[playerid]+(0+(random(10))),FRY[playerid]-(0+(random(10))),FRZ[playerid]-5, 0, 0,0);
  740.         Light[5][playerid] = CreateObject(354,FRX[playerid]+(0+(random(10))),FRY[playerid]+(0+(random(10))),FRZ[playerid]-5, 0, 0,0);
  741.         Light[6][playerid] = CreateObject(354,FRX[playerid]+(0+(random(10))),FRY[playerid],FRZ[playerid]-5, 0, 0,0);
  742.         Light[7][playerid] = CreateObject(354,FRX[playerid],FRY[playerid]-(0+(random(10))),FRZ[playerid]-5, 0, 0,0);
  743.         Light[8][playerid] = CreateObject(354,FRX[playerid],FRY[playerid]+(0+(random(10))),FRZ[playerid]-5, 0, 0,0);
  744.         new Float:X,Float:Y,Float:Z;
  745.         GetObjectPos(Light[1][playerid], X, Y, Z);
  746.         MoveObject(Light[1][playerid], X-6, Y-6, Z-20, 4);
  747.         GetObjectPos(Light[2][playerid], X, Y, Z);
  748.         MoveObject(Light[2][playerid], X-6, Y+6, Z-20, 4);
  749.         GetObjectPos(Light[3][playerid], X, Y, Z);
  750.         MoveObject(Light[3][playerid], X-6, Y, Z-20, 4);
  751.         GetObjectPos(Light[4][playerid], X, Y, Z);
  752.         MoveObject(Light[4][playerid], X+6, Y-6, Z-20, 4);
  753.         GetObjectPos(Light[5][playerid], X, Y, Z);
  754.         MoveObject(Light[5][playerid], X+6, Y+6, Z-20, 4);
  755.         GetObjectPos(Light[6][playerid], X, Y, Z);
  756.         MoveObject(Light[6][playerid], X+6, Y, Z-20, 4);
  757.         GetObjectPos(Light[7][playerid], X, Y, Z);
  758.         MoveObject(Light[7][playerid], X, Y-6, Z-20, 4);
  759.         GetObjectPos(Light[8][playerid], X, Y, Z);
  760.         MoveObject(Light[8][playerid], X, Y+6, Z-20, 4);
  761.         SetTimerEx("splittime3", 3000, 0, "i", playerid);
  762.         DestroyObject(Firerocket[playerid]);
  763.         DestroyObject(rocketsmoke[playerid]);
  764.         return 1;
  765.     }
  766.     return 1;
  767. }
  768.  
  769. public splittime3(playerid)
  770. {
  771.     if(firerockettime[playerid] == 2)
  772.     {
  773.         new Float:X,Float:Y,Float:Z;
  774.         GetObjectPos(Light[1][playerid], X, Y, Z);
  775.         CreateExplosion(X, Y, Z, 6, 0);
  776.         GetObjectPos(Light[2][playerid], X, Y, Z);
  777.         CreateExplosion(X, Y, Z, 6, 0);
  778.         GetObjectPos(Light[3][playerid], X, Y, Z);
  779.         CreateExplosion(X, Y, Z, 6, 0);
  780.         GetObjectPos(Light[4][playerid], X, Y, Z);
  781.         CreateExplosion(X, Y, Z, 6, 0);
  782.         GetObjectPos(Light[5][playerid], X, Y, Z);
  783.         CreateExplosion(X, Y, Z, 6, 0);
  784.         GetObjectPos(Light[6][playerid], X, Y, Z);
  785.         CreateExplosion(X, Y, Z, 6, 0);
  786.         GetObjectPos(Light[7][playerid], X, Y, Z);
  787.         CreateExplosion(X, Y, Z, 6, 0);
  788.         GetObjectPos(Light[8][playerid], X, Y, Z);
  789.         CreateExplosion(X, Y, Z, 6, 0);
  790.         GetObjectPos(Light[9][playerid], X, Y, Z);
  791.         Light[11][playerid] = CreateObject(1213,X-7,Y+7,Z+8, 0, 0,0);
  792.         Light[12][playerid] = CreateObject(1213,X-7,Y,Z+5, 0, 0,0);
  793.         Light[13][playerid] = CreateObject(1213,X,Y+7,Z-5, 0, 0,0);
  794.         Light[14][playerid] = CreateObject(1213,X,Y-7,Z-5, 0, 0,0);
  795.         GetObjectPos(Light[2][playerid], X, Y, Z);
  796.         Light[15][playerid] = CreateObject(1213,X,Y-7,Z+5, 0, 0,0);
  797.         Light[16][playerid] = CreateObject(1213,X-7,Y,Z-5, 0, 0,0);
  798.         Light[17][playerid] = CreateObject(1213,X,Y+7,Z-8, 0, 0,0);
  799.         Light[18][playerid] = CreateObject(1213,X,Y+7,Z-5, 0, 0,0);
  800.         GetObjectPos(Light[3][playerid], X, Y, Z);
  801.         Light[19][playerid] = CreateObject(1213,X+7,Y,Z-1, 0, 0,0);
  802.         Light[20][playerid] = CreateObject(1213,X-7,Y,Z-8, 0, 0,0);
  803.         Light[21][playerid] = CreateObject(1213,X+7,Y+7,Z-5, 0, 0,0);
  804.         Light[22][playerid] = CreateObject(1213,X,Y,Z+5, 0, 0,0);
  805.         GetObjectPos(Light[4][playerid], X, Y, Z);
  806.         Light[23][playerid] = CreateObject(1213,X+7,Y-7,Z-5, 0, 0,0);
  807.         Light[24][playerid] = CreateObject(1213,X-7,Y,Z-7, 0, 0,0);
  808.         Light[25][playerid] = CreateObject(1213,X+7,Y+7,Z+5, 0, 0,0);
  809.         Light[26][playerid] = CreateObject(1213,X,Y-7,Z, 0, 0,0);
  810.         GetObjectPos(Light[5][playerid], X, Y, Z);
  811.         Light[27][playerid] = CreateObject(1213,X,Y-7,Z-5, 0, 0,0);
  812.         Light[28][playerid] = CreateObject(1213,X-7,Y,Z+8, 0, 0,0);
  813.         Light[29][playerid] = CreateObject(1213,X+7,Y,Z-8, 0, 0,0);
  814.         Light[30][playerid] = CreateObject(1213,X,Y+7,Z+5, 0, 0,0);
  815.         GetObjectPos(Light[6][playerid], X, Y, Z);
  816.         Light[31][playerid] = CreateObject(1213,X-7,Y-7,Z-7, 0, 0,0);
  817.         Light[32][playerid] = CreateObject(1213,X,Y,Z-5, 0, 0,0);
  818.         Light[33][playerid] = CreateObject(1213,X+7,Y+7,Z+5, 0, 0,0);
  819.         Light[34][playerid] = CreateObject(1213,X+4,Y-7,Z-5, 0, 0,0);
  820.         GetObjectPos(Light[7][playerid], X, Y, Z);
  821.         Light[35][playerid] = CreateObject(1213,X-7,Y-7,Z-8, 0, 0,0);
  822.         Light[36][playerid] = CreateObject(1213,X-7,Y,Z+5, 0, 0,0);
  823.         Light[37][playerid] = CreateObject(1213,X,Y,Z-5, 0, 0,0);
  824.         Light[38][playerid] = CreateObject(1213,X,Y-7,Z+8, 0, 0,0);
  825.         GetObjectPos(Light[8][playerid], X, Y, Z);
  826.         Light[39][playerid] = CreateObject(1213,X-4,Y-7,Z-8, 0, 0,0);
  827.         Light[40][playerid] = CreateObject(1213,X+7,Y,Z+8, 0, 0,0);
  828.         Light[41][playerid] = CreateObject(1213,X+4,Y,Z+5, 0, 0,0);
  829.         Light[42][playerid] = CreateObject(1213,X,Y-7,Z-5, 0, 0,0);
  830.         GetObjectPos(Light[1][playerid], X, Y, Z);
  831.         MoveObject(Light[1][playerid], X-6, Y-6, Z-20, 4);
  832.         GetObjectPos(Light[2][playerid], X, Y, Z);
  833.         MoveObject(Light[2][playerid], X-6, Y+6, Z-20, 4);
  834.         GetObjectPos(Light[3][playerid], X, Y, Z);
  835.         MoveObject(Light[3][playerid], X-6, Y, Z-20, 4);
  836.         GetObjectPos(Light[4][playerid], X, Y, Z);
  837.         MoveObject(Light[4][playerid], X+6, Y-6, Z-20, 4);
  838.         GetObjectPos(Light[5][playerid], X, Y, Z);
  839.         MoveObject(Light[5][playerid], X+6, Y+6, Z-20, 4);
  840.         GetObjectPos(Light[6][playerid], X, Y, Z);
  841.         MoveObject(Light[6][playerid], X+6, Y, Z-20, 4);
  842.         GetObjectPos(Light[7][playerid], X, Y, Z);
  843.         MoveObject(Light[1][playerid], X, Y-6, Z-20, 4);
  844.         GetObjectPos(Light[8][playerid], X, Y, Z);
  845.         MoveObject(Light[8][playerid], X, Y+6, Z-20, 4);
  846.         GetObjectPos(Light[11][playerid], X, Y, Z);
  847.         MoveObject(Light[11][playerid], X-6, Y-6, Z-20, 4);
  848.         GetObjectPos(Light[12][playerid], X, Y, Z);
  849.         MoveObject(Light[12][playerid], X-6, Y-6, Z-20, 4);
  850.         GetObjectPos(Light[13][playerid], X, Y, Z);
  851.         MoveObject(Light[13][playerid], X-6, Y-6, Z-20, 4);
  852.         GetObjectPos(Light[14][playerid], X, Y, Z);
  853.         MoveObject(Light[14][playerid], X-6, Y-6, Z-20, 4);
  854.         GetObjectPos(Light[15][playerid], X, Y, Z);
  855.         MoveObject(Light[15][playerid], X-6, Y-6, Z-20, 4);
  856.         GetObjectPos(Light[16][playerid], X, Y, Z);
  857.         MoveObject(Light[16][playerid], X-6, Y-6, Z-20, 4);
  858.         GetObjectPos(Light[17][playerid], X, Y, Z);
  859.         MoveObject(Light[17][playerid], X-6, Y-6, Z-20, 4);
  860.         GetObjectPos(Light[18][playerid], X, Y, Z);
  861.         MoveObject(Light[18][playerid], X-6, Y-6, Z-20, 4);
  862.         GetObjectPos(Light[19][playerid], X, Y, Z);
  863.         MoveObject(Light[19][playerid], X-6, Y-6, Z-20, 4);
  864.         GetObjectPos(Light[20][playerid], X, Y, Z);
  865.         MoveObject(Light[20][playerid], X-6, Y-6, Z-20, 4);
  866.         GetObjectPos(Light[21][playerid], X, Y, Z);
  867.         MoveObject(Light[21][playerid], X-6, Y-6, Z-20, 4);
  868.         GetObjectPos(Light[22][playerid], X, Y, Z);
  869.         MoveObject(Light[22][playerid], X-6, Y-6, Z-20, 4);
  870.         GetObjectPos(Light[23][playerid], X, Y, Z);
  871.         MoveObject(Light[23][playerid], X-6, Y-6, Z-20, 4);
  872.         GetObjectPos(Light[24][playerid], X, Y, Z);
  873.         MoveObject(Light[24][playerid], X-6, Y-6, Z-20, 4);
  874.         GetObjectPos(Light[25][playerid], X, Y, Z);
  875.         MoveObject(Light[25][playerid], X-6, Y-6, Z-20, 4);
  876.         GetObjectPos(Light[26][playerid], X, Y, Z);
  877.         MoveObject(Light[26][playerid], X-6, Y-6, Z-20, 4);
  878.         GetObjectPos(Light[27][playerid], X, Y, Z);
  879.         MoveObject(Light[27][playerid], X-6, Y-6, Z-20, 4);
  880.         GetObjectPos(Light[28][playerid], X, Y, Z);
  881.         MoveObject(Light[28][playerid], X-6, Y-6, Z-20, 4);
  882.         GetObjectPos(Light[29][playerid], X, Y, Z);
  883.         MoveObject(Light[29][playerid], X-6, Y-6, Z-20, 4);
  884.         GetObjectPos(Light[30][playerid], X, Y, Z);
  885.         MoveObject(Light[30][playerid], X-6, Y-6, Z-20, 4);
  886.         GetObjectPos(Light[31][playerid], X, Y, Z);
  887.         MoveObject(Light[31][playerid], X-6, Y-6, Z-20, 4);
  888.         GetObjectPos(Light[32][playerid], X, Y, Z);
  889.         MoveObject(Light[32][playerid], X-6, Y-6, Z-20, 4);
  890.         GetObjectPos(Light[33][playerid], X, Y, Z);
  891.         MoveObject(Light[33][playerid], X-6, Y-6, Z-20, 4);
  892.         GetObjectPos(Light[34][playerid], X, Y, Z);
  893.         MoveObject(Light[34][playerid], X-6, Y-6, Z-20, 4);
  894.         GetObjectPos(Light[35][playerid], X, Y, Z);
  895.         MoveObject(Light[35][playerid], X-6, Y-6, Z-20, 4);
  896.         GetObjectPos(Light[36][playerid], X, Y, Z);
  897.         MoveObject(Light[36][playerid], X-6, Y-6, Z-20, 4);
  898.         GetObjectPos(Light[37][playerid], X, Y, Z);
  899.         MoveObject(Light[37][playerid], X-6, Y-6, Z-20, 4);
  900.         GetObjectPos(Light[38][playerid], X, Y, Z);
  901.         MoveObject(Light[38][playerid], X-6, Y-6, Z-20, 4);
  902.         GetObjectPos(Light[39][playerid], X, Y, Z);
  903.         MoveObject(Light[39][playerid], X-6, Y-6, Z-20, 4);
  904.         GetObjectPos(Light[40][playerid], X, Y, Z);
  905.         MoveObject(Light[40][playerid], X-6, Y-6, Z-20, 4);
  906.         GetObjectPos(Light[41][playerid], X, Y, Z);
  907.         MoveObject(Light[41][playerid], X-6, Y-6, Z-20, 4);
  908.         GetObjectPos(Light[42][playerid], X, Y, Z);
  909.         MoveObject(Light[42][playerid], X-6, Y-6, Z-20, 4);
  910.         SetTimerEx("lighttimer2", 4000, 0, "i", playerid);
  911.         DestroyObject(Firerocket[playerid]);
  912.         DestroyObject(rocketsmoke[playerid]);
  913.         return 1;
  914.     }
  915.     return 1;
  916. }
  917.  
  918. public lighttimer(playerid)
  919. {
  920.     DestroyObject(Light[1][playerid]);
  921.     DestroyObject(Light[2][playerid]);
  922.     DestroyObject(Light[3][playerid]);
  923.     DestroyObject(Light[4][playerid]);
  924.     DestroyObject(Light[5][playerid]);
  925.     DestroyObject(Light[6][playerid]);
  926.     DestroyObject(Light[7][playerid]);
  927.     DestroyObject(Light[8][playerid]);
  928.     firerockettime[playerid] = 0;
  929.     return 1;
  930. }
  931.  
  932. public lighttimer2(playerid)
  933. {
  934.     DestroyObject(Light[1][playerid]);
  935.     DestroyObject(Light[2][playerid]);
  936.     DestroyObject(Light[3][playerid]);
  937.     DestroyObject(Light[4][playerid]);
  938.     DestroyObject(Light[5][playerid]);
  939.     DestroyObject(Light[6][playerid]);
  940.     DestroyObject(Light[7][playerid]);
  941.     DestroyObject(Light[8][playerid]);
  942.     DestroyObject(Light[11][playerid]);
  943.     DestroyObject(Light[12][playerid]);
  944.     DestroyObject(Light[13][playerid]);
  945.     DestroyObject(Light[14][playerid]);
  946.     DestroyObject(Light[15][playerid]);
  947.     DestroyObject(Light[16][playerid]);
  948.     DestroyObject(Light[17][playerid]);
  949.     DestroyObject(Light[18][playerid]);
  950.     DestroyObject(Light[19][playerid]);
  951.     DestroyObject(Light[20][playerid]);
  952.     DestroyObject(Light[21][playerid]);
  953.     DestroyObject(Light[22][playerid]);
  954.     DestroyObject(Light[23][playerid]);
  955.     DestroyObject(Light[24][playerid]);
  956.     DestroyObject(Light[25][playerid]);
  957.     DestroyObject(Light[26][playerid]);
  958.     DestroyObject(Light[27][playerid]);
  959.     DestroyObject(Light[28][playerid]);
  960.     DestroyObject(Light[29][playerid]);
  961.     DestroyObject(Light[30][playerid]);
  962.     DestroyObject(Light[31][playerid]);
  963.     DestroyObject(Light[32][playerid]);
  964.     DestroyObject(Light[33][playerid]);
  965.     DestroyObject(Light[34][playerid]);
  966.     DestroyObject(Light[35][playerid]);
  967.     DestroyObject(Light[36][playerid]);
  968.     DestroyObject(Light[37][playerid]);
  969.     DestroyObject(Light[38][playerid]);
  970.     DestroyObject(Light[39][playerid]);
  971.     DestroyObject(Light[40][playerid]);
  972.     DestroyObject(Light[41][playerid]);
  973.     DestroyObject(Light[42][playerid]);
  974.     firerockettime[playerid] = 0;
  975.     return 1;
  976. }
  977.  
  978. public OnFilterScriptInit()
  979. {
  980.     print("\n--------------------------------------");
  981.     print("Notime's Firework");
  982.     print("--------------------------------------\n");
  983.     if(!fexist("FireWorkInfo"))
  984.     {
  985.         djCreateFile("FireWorkInfo");
  986.         djSetInt("FireWorkInfo","FireCrackerAL", 0);
  987.         djSetInt("FireWorkInfo","FireRocket1AL", 0);
  988.         djSetInt("FireWorkInfo","FireRocket2AL", 0);
  989.         djSetInt("FireWorkInfo","CrackerrollAL", 0);
  990.         djSetInt("FireWorkInfo","Fountain1AL", 0);
  991.         djSetInt("FireWorkInfo","Fountain2AL", 0);
  992.         djSetInt("FireWorkInfo","Fountain3AL", 0);
  993.         djSetInt("FireWorkInfo","RocketBAL", 0);
  994.         djSetInt("FireWorkInfo","DrawDistance", 1);
  995.         print("[FWCP]: FireWorkInfo file created");
  996.     }
  997.     SetTimer("Load", 3000, 0);
  998.     djson_GameModeInit();
  999.     return 1;
  1000. }
  1001.  
  1002. forward Load();
  1003. public Load()
  1004. {
  1005.     LoadFireWorkInfo();
  1006.     return 1;
  1007. }
  1008.  
  1009. public OnFilterScriptExit()
  1010. {
  1011.     djson_GameModeExit();
  1012.     return 1;
  1013. }
  1014.  
  1015.  
  1016. main()
  1017. {
  1018.     print("\n--------------------------------------");
  1019.     print("Notime's Firework");
  1020.     print("--------------------------------------\n");
  1021. }
  1022.  
  1023.  
  1024. public OnGameModeInit()
  1025. {
  1026.     // Don't use these lines if it's a filterscript
  1027.     AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  1028.     return 1;
  1029. }
  1030.  
  1031. public OnGameModeExit()
  1032. {
  1033.     return 1;
  1034. }
  1035.  
  1036. public OnPlayerConnect(playerid)
  1037. {
  1038.     SendClientMessage(playerid, WHITE, "FilterScript loaded: Notime's Firework");
  1039.     return 1;
  1040. }
  1041.  
  1042. public OnPlayerRequestClass(playerid, classid)
  1043. {
  1044.     SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  1045.     SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  1046.     SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  1047.     return 1;
  1048. }
  1049.  
  1050. public OnPlayerCommandText(playerid, cmdtext[])
  1051. {
  1052.     dcmd(lightfw,7,cmdtext);
  1053.     dcmd(fwcp,4,cmdtext);
  1054.     if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  1055.     {
  1056.         // Do something here
  1057.         return 1;
  1058.     }
  1059.     return 0;
  1060. }
  1061.  
  1062. dcmd_lightfw(playerid, params[])
  1063. {
  1064.     new distance;
  1065.     if(AllowedFirework[DrawDistance] == 0) distance = 15;
  1066.     if(AllowedFirework[DrawDistance] == 1) distance = 22;
  1067.     if(AllowedFirework[DrawDistance] == 2) distance = 30;
  1068.     if(!strlen(params))
  1069.     {
  1070.         SendClientMessage(playerid, COLOR_TAN, "Right Usage: /lightfw [type]");
  1071.         SendClientMessage(playerid, COLOR_TAN, "Types: Firecracker, crackerroll, firerocket1, firerocket2, fountain1, fountain2, fountain3, rocketbox");
  1072.         return 1;
  1073.     }
  1074.     if(strcmp("firecracker", params, true, 8) == 0)
  1075.     {
  1076.         if(AllowedFirework[FireCracker] == 1 && IsPlayerAdmin(playerid) || AllowedFirework[FireCracker] == 0)
  1077.         {
  1078.             if(firecrackertime[playerid] == 0)
  1079.             {
  1080.                 new Float:X, Float:Y,Float:Z;
  1081.                 firecrackertime[playerid] = 1;
  1082.                 new string[128];
  1083.                 new sendername[MAX_PLAYER_NAME];
  1084.                 GetPlayerName(playerid, sendername, sizeof(sendername));
  1085.                 format(string, sizeof(string), "<> %s throws away a firecracker.", sendername);
  1086.                 ProxDetector(15.0, playerid, string, WHITE,WHITE,WHITE,WHITE,WHITE);
  1087.                 GetPlayerPos(playerid,X,Y,Z);
  1088.                 GetXYInFrontOfPlayer(playerid, X,Y, 8);
  1089.                 Firecracker[playerid] = CreateObject(1672, X,Y,(Z-0.9), 0, 0, 0);
  1090.                 SetTimerEx("FirecrackerTime", (2000+(random(3000))), 0, "i", playerid);
  1091.                 return 1;
  1092.             }
  1093.             else return SendClientMessage(playerid, RED, "ERROR: You already threw a firecracker.");
  1094.         }
  1095.         else return SendClientMessage(playerid, RED, "ERROR: The Firecracker is enabled for rcon admins only");
  1096.     }
  1097.     if(strcmp("crackerroll", params, true, 11) == 0)
  1098.     {
  1099.         if(AllowedFirework[Crackerroll] == 1 && IsPlayerAdmin(playerid) || AllowedFirework[Crackerroll] == 0)
  1100.         {
  1101.             if(firecrackerroll[playerid] == 0)
  1102.             {
  1103.                 new Float:X, Float:Y,Float:Z;
  1104.                 firecrackerroll[playerid] = 1;
  1105.                 new string[128];
  1106.                 new sendername[MAX_PLAYER_NAME];
  1107.                 GetPlayerName(playerid, sendername, sizeof(sendername));
  1108.                 format(string, sizeof(string), "<> %s Places down a firecracker roll", sendername);
  1109.                 ProxDetector(15.0, playerid, string, WHITE,WHITE,WHITE,WHITE,WHITE);
  1110.                 GetPlayerPos(playerid,X,Y,Z);
  1111.                 GetXYInFrontOfPlayer(playerid, X,Y, 8);
  1112.                 FireCrackerRoll[playerid] = CreateRoll(playerid,X,Y,(Z-1.00));
  1113.                 RollStartX[playerid] = X;
  1114.                 RollStartY[playerid] = Y;
  1115.                 RollStartZ[playerid] = (Z-1.00);
  1116.                 CrackerRollSmoke[playerid] = CreateObject(2780, X, Y, (Z-5.00), 0, 0, 0);
  1117.                 SetTimerEx("CrackerRollTime", (2000+(random(3000))), 0, "i", playerid);
  1118.                 return 1;
  1119.             }
  1120.             else return SendClientMessage(playerid, RED, "ERROR: You already placed a firecracker roll.");
  1121.         }
  1122.         else return SendClientMessage(playerid, RED, "ERROR: The CrackerRoll is enabled for rcon admins only");
  1123.     }
  1124.     if(strcmp("firerocket1", params, true, 11) == 0)
  1125.     {
  1126.         if(AllowedFirework[Firerocket1] == 1 && IsPlayerAdmin(playerid) || AllowedFirework[Firerocket1] == 0)
  1127.         {
  1128.             if(firerockettime[playerid] == 0)
  1129.             {
  1130.                 new Float:X, Float:Y,Float:Z;
  1131.                 firerockettime[playerid] = 1;
  1132.                 new string[128];
  1133.                 new sendername[MAX_PLAYER_NAME];
  1134.                 GetPlayerName(playerid, sendername, sizeof(sendername));
  1135.                 format(string, sizeof(string), "<> %s lights up a fire rocket.", sendername);
  1136.                 ProxDetector(15.0, playerid, string, WHITE,WHITE,WHITE,WHITE,WHITE);
  1137.                 GetPlayerPos(playerid,X,Y,Z);
  1138.                 GetXYInFrontOfPlayer(playerid, X,Y, distance);
  1139.                 Firerocket[playerid] = CreateObject(354, X,Y,(Z), 0, 0, 0);
  1140.                 rocketsmoke[playerid] = CreateObject(2780, X,Y,(Z), 0, 0, 0);
  1141.                 MoveObject(Firerocket[playerid], X, Y, Z+30, 10);
  1142.                 MoveObject(rocketsmoke[playerid], X, Y, Z+30, 10);
  1143.                 SetTimerEx("FirerocketTime", 3000, 0, "i", playerid);
  1144.                 return 1;
  1145.             }
  1146.             else return SendClientMessage(playerid, RED, "ERROR: You already lightd a firerocket.");
  1147.         }
  1148.         else return SendClientMessage(playerid, RED, "ERROR: The FireRocket 1 is enabled for rcon admins only");
  1149.     }
  1150.     if(strcmp("firerocket2", params, true, 11) == 0)
  1151.     {
  1152.         if(AllowedFirework[Firerocket2] == 1 && IsPlayerAdmin(playerid) || AllowedFirework[Firerocket2] == 0)
  1153.         {
  1154.             if(firerockettime[playerid] == 0)
  1155.             {
  1156.                 new Float:X, Float:Y,Float:Z;
  1157.                 firerockettime[playerid] = 2;
  1158.                 new string[128];
  1159.                 new sendername[MAX_PLAYER_NAME];
  1160.                 GetPlayerName(playerid, sendername, sizeof(sendername));
  1161.                 format(string, sizeof(string), "<> %s lights up a fire rocket.", sendername);
  1162.                 ProxDetector(15.0, playerid, string, WHITE,WHITE,WHITE,WHITE,WHITE);
  1163.                 GetPlayerPos(playerid,X,Y,Z);
  1164.                 GetXYInFrontOfPlayer(playerid, X,Y, distance);
  1165.                 Firerocket[playerid] = CreateObject(354, X,Y,(Z), 0, 0, 0);
  1166.                 rocketsmoke[playerid] = CreateObject(2780, X,Y,(Z), 0, 0, 0);
  1167.                 MoveObject(Firerocket[playerid], X, Y, Z+50, 15);
  1168.                 MoveObject(rocketsmoke[playerid], X, Y, Z+50, 15);
  1169.                 SetTimerEx("FirerocketTime", 3000, 0, "i", playerid);
  1170.                 return 1;
  1171.             }
  1172.             else return SendClientMessage(playerid, RED, "ERROR: You already Light a firerocket.");
  1173.         }
  1174.         else return SendClientMessage(playerid, RED, "ERROR: The FireRocket 2 is enabled for rcon admins only");
  1175.     }
  1176.     if(strcmp("fountain1", params, true, 9) == 0)
  1177.     {
  1178.         if(AllowedFirework[Fountain1] == 1 && IsPlayerAdmin(playerid) || AllowedFirework[Fountain1] == 0)
  1179.         {
  1180.             if(Fountain1Time[playerid] == 0 && Fountain2Time[playerid] == 0 && Fountain3Time[playerid] == 0)
  1181.             {
  1182.                 new Float:X, Float:Y,Float:Z;
  1183.                 Fountain1Time[playerid] = 1;
  1184.                 new string[128];
  1185.                 new sendername[MAX_PLAYER_NAME];
  1186.                 GetPlayerName(playerid, sendername, sizeof(sendername));
  1187.                 format(string, sizeof(string), "<> %s places a Firework Fountain on the ground.", sendername);
  1188.                 ProxDetector(15.0, playerid, string, WHITE,WHITE,WHITE,WHITE,WHITE);
  1189.                 GetPlayerPos(playerid,X,Y,Z);
  1190.                 GetXYInFrontOfPlayer(playerid, X,Y, 15);
  1191.                 FTX[playerid] = X;
  1192.                 FTY[playerid] = Y;
  1193.                 FTZ[playerid] = (Z-1.0);
  1194.                 Fountain[playerid] = CreateObject(354, X,Y,(Z-1.0), 0, 0, 0);
  1195.                 FountainSmoke[playerid] = CreateObject(2780, X,Y,(Z-1.0), 0, 0, 0);
  1196.                 SetTimerEx("FountainTimer", 3000, 0, "i", playerid);
  1197.                 return 1;
  1198.             }
  1199.             else return SendClientMessage(playerid, RED, "ERROR: You already Light a Firework Fountain.");
  1200.         }
  1201.         else return SendClientMessage(playerid, RED, "ERROR: The Fountain 1 is enabled for rcon admins only");
  1202.     }
  1203.     if(strcmp("fountain2", params, true, 9) == 0)
  1204.     {
  1205.         if(AllowedFirework[Fountain2] == 1 && IsPlayerAdmin(playerid) || AllowedFirework[Fountain2] == 0)
  1206.         {
  1207.             if(Fountain1Time[playerid] == 0 && Fountain2Time[playerid] == 0 && Fountain3Time[playerid] == 0)
  1208.             {
  1209.                 new Float:X, Float:Y,Float:Z;
  1210.                 Fountain2Time[playerid] = 1;
  1211.                 new string[128];
  1212.                 new sendername[MAX_PLAYER_NAME];
  1213.                 GetPlayerName(playerid, sendername, sizeof(sendername));
  1214.                 format(string, sizeof(string), "<> %s places a Firework Fountain on the ground.", sendername);
  1215.                 ProxDetector(15.0, playerid, string, WHITE,WHITE,WHITE,WHITE,WHITE);
  1216.                 GetPlayerPos(playerid,X,Y,Z);
  1217.                 GetXYInFrontOfPlayer(playerid, X,Y, 15);
  1218.                 FTX[playerid] = X;
  1219.                 FTY[playerid] = Y;
  1220.                 FTZ[playerid] = (Z-1.0);
  1221.                 Fountain[playerid] = CreateObject(354, X,Y,(Z-1.0), 0, 0, 0);
  1222.                 FountainSmoke[playerid] = CreateObject(2780, X,Y,(Z-1.0), 0, 0, 0);
  1223.                 SetTimerEx("FountainTimer", 3000, 0, "i", playerid);
  1224.                 return 1;
  1225.             }
  1226.             else return SendClientMessage(playerid, RED, "ERROR: You already Light a Firework Fountain.");
  1227.         }
  1228.         else return SendClientMessage(playerid, RED, "ERROR: The Fountain 2 is enabled for rcon admins only");
  1229.     }
  1230.     if(strcmp("fountain3", params, true, 9) == 0)
  1231.     {
  1232.         if(AllowedFirework[Fountain3] == 1 && IsPlayerAdmin(playerid) || AllowedFirework[Fountain3] == 0)
  1233.         {
  1234.             if(Fountain1Time[playerid] == 0 && Fountain2Time[playerid] == 0 && Fountain3Time[playerid] == 0)
  1235.             {
  1236.                 new Float:X, Float:Y,Float:Z;
  1237.                 Fountain3Time[playerid] = 1;
  1238.                 new string[128];
  1239.                 new sendername[MAX_PLAYER_NAME];
  1240.                 GetPlayerName(playerid, sendername, sizeof(sendername));
  1241.                 format(string, sizeof(string), "<> %s places a Firework Fountain on the ground.", sendername);
  1242.                 ProxDetector(15.0, playerid, string, WHITE,WHITE,WHITE,WHITE,WHITE);
  1243.                 GetPlayerPos(playerid,X,Y,Z);
  1244.                 GetXYInFrontOfPlayer(playerid, X,Y, 15);
  1245.                 FTX[playerid] = X;
  1246.                 FTY[playerid] = Y;
  1247.                 FTZ[playerid] = (Z-1.0);
  1248.                 Fountain[playerid] = CreateObject(354, X,Y,(Z-1.0), 0, 0, 0);
  1249.                 FountainSmoke[playerid] = CreateObject(2780, X,Y,(Z-1.0), 0, 0, 0);
  1250.                 SetTimerEx("FountainTimer", 3000, 0, "i", playerid);
  1251.                 return 1;
  1252.             }
  1253.             else return SendClientMessage(playerid, RED, "ERROR: You already Light a Firework Fountain.");
  1254.         }
  1255.         else return SendClientMessage(playerid, RED, "ERROR: The Fountain 3 is enabled for rcon admins only");
  1256.     }
  1257.     if(strcmp("rocketbox", params, true, 9) == 0)
  1258.     {
  1259.         if(AllowedFirework[RocketB] == 1 && IsPlayerAdmin(playerid) || AllowedFirework[RocketB] == 0)
  1260.         {
  1261.             if(RocketBoxTime[playerid] == 0)
  1262.             {
  1263.                 new Float:X, Float:Y,Float:Z;
  1264.                 RocketBoxTime[playerid] = 1;
  1265.                 new string[128];
  1266.                 new sendername[MAX_PLAYER_NAME];
  1267.                 GetPlayerName(playerid, sendername, sizeof(sendername));
  1268.                 format(string, sizeof(string), "<> %s places a Rocketbox on the ground.", sendername);
  1269.                 ProxDetector(15.0, playerid, string, WHITE,WHITE,WHITE,WHITE,WHITE);
  1270.                 GetPlayerPos(playerid,X,Y,Z);
  1271.                 GetXYInFrontOfPlayer(playerid, X,Y, distance);
  1272.                 RBX[playerid] = X;
  1273.                 RBY[playerid] = Y;
  1274.                 RBZ[playerid] = (Z-1.0);
  1275.                 RocketBox[playerid] = CreateObject(354, X,Y,(Z-1.0), 0, 0, 0);
  1276.                 RocketBoxSmoke[playerid] = CreateObject(2780, X,Y,(Z-1.0), 0, 0, 0);
  1277.                 SetTimerEx("RocketBoxTimer", 3000, 0, "i", playerid);
  1278.                 return 1;
  1279.             }
  1280.             else return SendClientMessage(playerid, RED, "ERROR: You already Light a Firework RocketBox.");
  1281.         }
  1282.         else return SendClientMessage(playerid, RED, "ERROR: The RocketBox is enabled for rcon admins only");
  1283.     }
  1284.     else return SendClientMessage(playerid, COLOR_TAN, "Right Usage: /lightfirework [type]");
  1285. }
  1286.  
  1287. dcmd_fwcp(playerid, params[])
  1288. {
  1289.     #pragma unused params
  1290.     if(IsPlayerAdmin(playerid))
  1291.     {
  1292.         new string[512];
  1293.         format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1294.         DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1295.         ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1296.         return 1;
  1297.     }
  1298.     else return SendClientMessage(playerid, RED, "[Notime Bot]: U are not allowed to use this command");
  1299. }
  1300.  
  1301. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  1302. {
  1303.     if(dialogid == FWCPM)
  1304.     {
  1305.         if(response == 0) return SendClientMessage(playerid, WHITE, "[NotimeBot]: You closed the Fire Work Control Panel");
  1306.         if(response == 1)
  1307.         {
  1308.             switch (listitem)
  1309.             {
  1310.                 case 0: //DrawDistance
  1311.                 {
  1312.                     ShowPlayerDialog(playerid, FWCPDD, DIALOG_STYLE_LIST, "FireWork Control Panel > -Draw Distance Setting-", "Low\nMedium\nHigh", "Select", "Back");
  1313.                     return 1;
  1314.                 }
  1315.                 case 1://Firecracker
  1316.                 {
  1317.                     ShowPlayerDialog(playerid, FWCPFC, DIALOG_STYLE_LIST, "FireWork Control Panel > -FireCracker Usable for:-", "Usable for all players\nUsable for Rcon Admins only", "Select", "Back");
  1318.                     return 1;
  1319.                 }
  1320.                 case 2://Firerocket1
  1321.                 {
  1322.                     ShowPlayerDialog(playerid, FWCPFR1, DIALOG_STYLE_LIST, "FireWork Control Panel > -FireRocket1 Usable for:-", "Usable for all players\nUsable for Rcon Admins only", "Select", "Back");
  1323.                     return 1;
  1324.                 }
  1325.                 case 3://Firerocket2
  1326.                 {
  1327.                     ShowPlayerDialog(playerid, FWCPFR2, DIALOG_STYLE_LIST, "FireWork Control Panel > -FireRocket2 Usable for:-", "Usable for all players\nUsable for Rcon Admins only", "Select", "Back");
  1328.                     return 1;
  1329.                 }
  1330.                 case 4://Crackerroll
  1331.                 {
  1332.                     ShowPlayerDialog(playerid, FWCPCR, DIALOG_STYLE_LIST, "FireWork Control Panel > -CrackerRoll Usable for:-", "Usable for all players\nUsable for Rcon Admins only", "Select", "Back");
  1333.                     return 1;
  1334.                 }
  1335.                 case 5://Fountain1
  1336.                 {
  1337.                     ShowPlayerDialog(playerid, FWCPFT1, DIALOG_STYLE_LIST, "FireWork Control Panel > -Fountain1 Usable for:-", "Usable for all players\nUsable for Rcon Admins only", "Select", "Back");
  1338.                     return 1;
  1339.                 }
  1340.                 case 6://Fountain2
  1341.                 {
  1342.                     ShowPlayerDialog(playerid, FWCPFT2, DIALOG_STYLE_LIST, "FireWork Control Panel > -Fountain2 Usable for:-", "Usable for all players\nUsable for Rcon Admins only", "Select", "Back");
  1343.                     return 1;
  1344.                 }
  1345.                 case 7://Fountain3
  1346.                 {
  1347.                     ShowPlayerDialog(playerid, FWCPFT3, DIALOG_STYLE_LIST, "FireWork Control Panel > -Fountain3 Usable for:-", "Usable for all players\nUsable for Rcon Admins only", "Select", "Back");
  1348.                     return 1;
  1349.                 }
  1350.                 case 8://RocketBox
  1351.                 {
  1352.                     ShowPlayerDialog(playerid, FWCPRB, DIALOG_STYLE_LIST, "FireWork Control Panel > -RocketBox Usable for:-", "Usable for all players\nUsable for Rcon Admins only", "Select", "Back");
  1353.                     return 1;
  1354.                 }
  1355.             }
  1356.             return 1;
  1357.         }
  1358.         return 1;
  1359.     }
  1360.     if(dialogid == FWCPDD)
  1361.     {
  1362.         if(response == 0)
  1363.         {
  1364.             new string[512];
  1365.             format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1366.             DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1367.             ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1368.             return 1;
  1369.         }
  1370.         if(response == 1)
  1371.         {
  1372.             switch (listitem)
  1373.             {
  1374.                 case 0: //Low DrawDistance
  1375.                 {
  1376.                     SendClientMessage(playerid, WHITE, "[FWCP]: Draw distance set to low.");
  1377.                     new string[512];
  1378.                     AllowedFirework[DrawDistance] = 0;
  1379.                     format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1380.                     DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1381.                     ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1382.                     SaveFireWorkInfo();
  1383.                     return 1;
  1384.                 }
  1385.                 case 1://Medium DrawDistance
  1386.                 {
  1387.                     SendClientMessage(playerid, WHITE, "[FWCP]: Draw distance set to medium.");
  1388.                     new string[512];
  1389.                     AllowedFirework[DrawDistance] = 1;
  1390.                     format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1391.                     DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1392.                     ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1393.                     SaveFireWorkInfo();
  1394.                     return 1;
  1395.                 }
  1396.                 case 2://High DrawDistance
  1397.                 {
  1398.                     SendClientMessage(playerid, WHITE, "[FWCP]: Draw distance set to High.");
  1399.                     new string[512];
  1400.                     AllowedFirework[DrawDistance] = 2;
  1401.                     format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1402.                     DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1403.                     ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1404.                     SaveFireWorkInfo();
  1405.                     return 1;
  1406.                 }
  1407.             }
  1408.             return 1;
  1409.         }
  1410.         return 1;
  1411.     }
  1412.     if(dialogid == FWCPFC)
  1413.     {
  1414.         if(response == 0)
  1415.         {
  1416.             new string[512];
  1417.             format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1418.             DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1419.             ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1420.             return 1;
  1421.         }
  1422.         if(response == 1)
  1423.         {
  1424.             switch (listitem)
  1425.             {
  1426.                 case 0: //FireCracker usable for all
  1427.                 {
  1428.                     SendClientMessage(playerid, WHITE, "[FWCP]: The Firecracker is now enabled for all players.");
  1429.                     new string[512];
  1430.                     AllowedFirework[FireCracker] = 0;
  1431.                     format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1432.                     DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1433.                     ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1434.                     SaveFireWorkInfo();
  1435.                     return 1;
  1436.                 }
  1437.                 case 1://FireCracker usable for rcon only
  1438.                 {
  1439.                     SendClientMessage(playerid, WHITE, "[FWCP]: The Firecracker is now enabled for Rcon Admins only.");
  1440.                     new string[512];
  1441.                     AllowedFirework[FireCracker] = 1;
  1442.                     format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1443.                     DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1444.                     ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1445.                     SaveFireWorkInfo();
  1446.                     return 1;
  1447.                 }
  1448.             }
  1449.             return 1;
  1450.         }
  1451.         return 1;
  1452.     }
  1453.     if(dialogid == FWCPFR1)
  1454.     {
  1455.         if(response == 0)
  1456.         {
  1457.             new string[512];
  1458.             format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1459.             DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1460.             ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1461.             return 1;
  1462.         }
  1463.         if(response == 1)
  1464.         {
  1465.             switch (listitem)
  1466.             {
  1467.                 case 0: //FireRocket1 usable for all
  1468.                 {
  1469.                     SendClientMessage(playerid, WHITE, "[FWCP]: The FireRocket 1 is now enabled for all players.");
  1470.                     new string[512];
  1471.                     AllowedFirework[Firerocket1] = 0;
  1472.                     format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1473.                     DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1474.                     ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1475.                     SaveFireWorkInfo();
  1476.                     return 1;
  1477.                 }
  1478.                 case 1://FireRocket1 usable for rcon only
  1479.                 {
  1480.                     SendClientMessage(playerid, WHITE, "[FWCP]: The FireRocket 1 is now enabled for Rcon Admins only.");
  1481.                     new string[512];
  1482.                     AllowedFirework[Firerocket1] = 1;
  1483.                     format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1484.                     DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1485.                     ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1486.                     SaveFireWorkInfo();
  1487.                     return 1;
  1488.                 }
  1489.             }
  1490.             return 1;
  1491.         }
  1492.         return 1;
  1493.     }
  1494.     if(dialogid == FWCPFR2)
  1495.     {
  1496.         if(response == 0)
  1497.         {
  1498.             new string[512];
  1499.             format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1500.             DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1501.             ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1502.             return 1;
  1503.         }
  1504.         if(response == 1)
  1505.         {
  1506.             switch (listitem)
  1507.             {
  1508.                 case 0: //FireRocket2 usable for all
  1509.                 {
  1510.                     SendClientMessage(playerid, WHITE, "[FWCP]: The FireRocket 2 is now enabled for all players.");
  1511.                     new string[512];
  1512.                     AllowedFirework[Firerocket2] = 0;
  1513.                     format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1514.                     DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1515.                     ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1516.                     SaveFireWorkInfo();
  1517.                     return 1;
  1518.                 }
  1519.                 case 1://FireRocket2 usable for rcon only
  1520.                 {
  1521.                     SendClientMessage(playerid, WHITE, "[FWCP]: The FireRocket 2 is now enabled for Rcon Admins only.");
  1522.                     new string[512];
  1523.                     AllowedFirework[Firerocket2] = 1;
  1524.                     format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1525.                     DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1526.                     ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1527.                     SaveFireWorkInfo();
  1528.                     return 1;
  1529.                 }
  1530.             }
  1531.             return 1;
  1532.         }
  1533.         return 1;
  1534.     }
  1535.     if(dialogid == FWCPCR)
  1536.     {
  1537.         if(response == 0)
  1538.         {
  1539.             new string[512];
  1540.             format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1541.             DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1542.             ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1543.             return 1;
  1544.         }
  1545.         if(response == 1)
  1546.         {
  1547.             switch (listitem)
  1548.             {
  1549.                 case 0: //CrackerRoll usable for all
  1550.                 {
  1551.                     SendClientMessage(playerid, WHITE, "[FWCP]: The CrackerRoll is now enabled for all players.");
  1552.                     new string[512];
  1553.                     AllowedFirework[Crackerroll] = 0;
  1554.                     format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1555.                     DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1556.                     ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1557.                     SaveFireWorkInfo();
  1558.                     return 1;
  1559.                 }
  1560.                 case 1://CrackerRoll usable for rcon only
  1561.                 {
  1562.                     SendClientMessage(playerid, WHITE, "[FWCP]: The CrackerRoll is now enabled for Rcon Admins only.");
  1563.                     new string[512];
  1564.                     AllowedFirework[Crackerroll] = 1;
  1565.                     format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1566.                     DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1567.                     ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1568.                     SaveFireWorkInfo();
  1569.                     return 1;
  1570.                 }
  1571.             }
  1572.             return 1;
  1573.         }
  1574.         return 1;
  1575.     }
  1576.     if(dialogid == FWCPFT1)
  1577.     {
  1578.         if(response == 0)
  1579.         {
  1580.             new string[512];
  1581.             format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1582.             DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1583.             ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1584.             return 1;
  1585.         }
  1586.         if(response == 1)
  1587.         {
  1588.             switch (listitem)
  1589.             {
  1590.                 case 0: //Fountain1 usable for all
  1591.                 {
  1592.                     SendClientMessage(playerid, WHITE, "[FWCP]: The Fountain 1 is now enabled for all players.");
  1593.                     new string[512];
  1594.                     AllowedFirework[Fountain1] = 0;
  1595.                     format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1596.                     DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1597.                     ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1598.                     SaveFireWorkInfo();
  1599.                     return 1;
  1600.                 }
  1601.                 case 1://Fountain1 usable for rcon only
  1602.                 {
  1603.                     SendClientMessage(playerid, WHITE, "[FWCP]: The Fountain 1 is now enabled for Rcon Admins only.");
  1604.                     new string[512];
  1605.                     AllowedFirework[Fountain1] = 1;
  1606.                     format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1607.                     DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1608.                     ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1609.                     SaveFireWorkInfo();
  1610.                     return 1;
  1611.                 }
  1612.             }
  1613.             return 1;
  1614.         }
  1615.         return 1;
  1616.     }
  1617.     if(dialogid == FWCPFT2)
  1618.     {
  1619.         if(response == 0)
  1620.         {
  1621.             new string[512];
  1622.             format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1623.             DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1624.             ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1625.             return 1;
  1626.         }
  1627.         if(response == 1)
  1628.         {
  1629.             switch (listitem)
  1630.             {
  1631.                 case 0: //Fountain2 usable for all
  1632.                 {
  1633.                     SendClientMessage(playerid, WHITE, "[FWCP]: The Fountain 2 is now enabled for all players.");
  1634.                     new string[512];
  1635.                     AllowedFirework[Fountain2] = 0;
  1636.                     format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1637.                     DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1638.                     ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1639.                     SaveFireWorkInfo();
  1640.                     return 1;
  1641.                 }
  1642.                 case 1://Fountain2 usable for rcon only
  1643.                 {
  1644.                     SendClientMessage(playerid, WHITE, "[FWCP]: The Fountain 2 is now enabled for Rcon Admins only.");
  1645.                     new string[512];
  1646.                     AllowedFirework[Fountain2] = 1;
  1647.                     format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1648.                     DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1649.                     ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1650.                     SaveFireWorkInfo();
  1651.                     return 1;
  1652.                 }
  1653.             }
  1654.             return 1;
  1655.         }
  1656.         return 1;
  1657.     }
  1658.     if(dialogid == FWCPFT3)
  1659.     {
  1660.         if(response == 0)
  1661.         {
  1662.             new string[512];
  1663.             format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1664.             DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1665.             ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1666.             return 1;
  1667.         }
  1668.         if(response == 1)
  1669.         {
  1670.             switch (listitem)
  1671.             {
  1672.                 case 0: //Fountain3 usable for all
  1673.                 {
  1674.                     SendClientMessage(playerid, WHITE, "[FWCP]: The Fountain 3 is now enabled for all players.");
  1675.                     new string[512];
  1676.                     AllowedFirework[Fountain3] = 0;
  1677.                     format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1678.                     DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1679.                     ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1680.                     SaveFireWorkInfo();
  1681.                     return 1;
  1682.                 }
  1683.                 case 1://Fountain3 usable for rcon only
  1684.                 {
  1685.                     SendClientMessage(playerid, WHITE, "[FWCP]: The Fountain 3 is now enabled for Rcon Admins only.");
  1686.                     new string[512];
  1687.                     AllowedFirework[Fountain3] = 1;
  1688.                     format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1689.                     DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1690.                     ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1691.                     SaveFireWorkInfo();
  1692.                     return 1;
  1693.                 }
  1694.             }
  1695.             return 1;
  1696.         }
  1697.         return 1;
  1698.     }
  1699.     if(dialogid == FWCPRB)
  1700.     {
  1701.         if(response == 0)
  1702.         {
  1703.             new string[512];
  1704.             format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1705.             DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1706.             ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1707.             return 1;
  1708.         }
  1709.         if(response == 1)
  1710.         {
  1711.             switch (listitem)
  1712.             {
  1713.                 case 0: //RocketBox usable for all
  1714.                 {
  1715.                     SendClientMessage(playerid, WHITE, "[FWCP]: The RocketBox is now enabled for all players.");
  1716.                     new string[512];
  1717.                     AllowedFirework[RocketB] = 0;
  1718.                     format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1719.                     DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1720.                     ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1721.                     SaveFireWorkInfo();
  1722.                     return 1;
  1723.                 }
  1724.                 case 1://RocketBox usable for rcon only
  1725.                 {
  1726.                     SendClientMessage(playerid, WHITE, "[FWCP]: The RocketBox is now enabled for Rcon Admins only.");
  1727.                     new string[512];
  1728.                     AllowedFirework[RocketB] = 1;
  1729.                     format(string, sizeof(string), "DrawDistance: %s\nFire Cracker: %s\nFirerocket1: %s\nFirerocket2: %s\nCrackerRoll: %s\nFountain1: %s\nFountain2: %s\nFountain3: %s\nRocketBox: %s",
  1730.                     DrawDistanceWord[AllowedFirework[DrawDistance]], UsageFW[AllowedFirework[FireCracker]], UsageFW[AllowedFirework[Firerocket1]], UsageFW[AllowedFirework[Firerocket2]], UsageFW[AllowedFirework[Crackerroll]], UsageFW[AllowedFirework[Fountain1]], UsageFW[AllowedFirework[Fountain2]], UsageFW[AllowedFirework[Fountain3]], UsageFW[AllowedFirework[RocketB]]);
  1731.                     ShowPlayerDialog(playerid, FWCPM,2,"FireWork Control Panel", string,"Select", "Close");
  1732.                     SaveFireWorkInfo();
  1733.                     return 1;
  1734.                 }
  1735.             }
  1736.             return 1;
  1737.         }
  1738.         return 1;
  1739.     }
  1740.     return 1;
  1741. }
  1742. /*
  1743. ////////////////////////////////////////////////////////////////////////////////
  1744. ///////////////////////  __   _  _  _   _        _     /////////////////////////
  1745. //////////////////////  |  _ |_ | \/ | | | |\ | | |   //////////////////////////
  1746. /////////////////////   \__/ |_ |_||_| |_| | \| |_|  ///////////////////////////
  1747. ////////////////////                                ////////////////////////////
  1748. ////////////////////////////////////////////////////////////////////////////////
  1749.  
  1750. */
Advertisement
Add Comment
Please, Sign In to add comment