Advertisement
Guest User

FireWorkv2.0 By Notime

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