Advertisement
Arxero

Untitled

Dec 11th, 2017
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 32.26 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <fakemeta>
  4. #include <engine>
  5.  
  6. // Sprite Index
  7. new ls_dot, fire, white, sprSmoke, sprLightning, sprBflare, sprRflare, sprGflare, sprTflare, sprOflare, sprPflare, sprYflare, garbgibs, flare3, sprFlare6, shockwave
  8.  
  9. // Has Sound Index
  10. new has_rocket = 0, has_drop = 0
  11.  
  12. new player_fireworks[33] = 0;
  13. new bool:allowed_fireworks[33] = false;
  14.  
  15. public check_fireworks(id,mode){
  16.     new amount;
  17.     if(get_cvar_num("fireworks_enable") == 0) {
  18.         if(!allowed_fireworks[id]) return 0;
  19.         return 1;
  20.     }
  21.  
  22.     if(mode == 0) {
  23.         if(!access(id,ADMIN_ADMIN)) return 0;
  24.         return 1;
  25.     }
  26.  
  27.     if(mode) {
  28.         if(access(id,ADMIN_ADMIN)) amount = get_cvar_num("fireworks_amaxcount")
  29.         else amount = get_cvar_num("fireworks_maxcount")
  30.    
  31.         if( (player_fireworks[id]) >= amount) return 0;
  32.     }
  33.    
  34.     return amount;
  35. }
  36.  
  37. public check_password(id){
  38.     new arg[200],password[200]
  39.     read_argv(1,arg,199)
  40.     get_cvar_string("fireworks",password,199)
  41.     trim(password)
  42.  
  43.     if(equali(arg,password,strlen(password))){
  44.         allowed_fireworks[id] = true;
  45.         client_print(id,print_chat,"[FIRE] Password Accepted")
  46.     }
  47.     else {
  48.         allowed_fireworks[id] = false;
  49.         client_print(id,print_chat,"[FIRE] Password Denied")
  50.     }
  51.  
  52.     return PLUGIN_HANDLED;
  53. }
  54.  
  55.  
  56. public spawn_shooter(id){
  57.     if(!check_fireworks(id,0)){
  58.         client_print(id,print_chat,"[FIRE] You are not allowed to throw shooters.")
  59.         return PLUGIN_HANDLED;
  60.     }
  61.  
  62.     new arg[30]
  63.     read_argv(1,arg,29)
  64.     new shots = str_to_num(arg)
  65.     if(!shots) shots = 5;
  66.  
  67.     read_argv(2,arg,29)
  68.     new Float:time2 = floatstr(arg)
  69.     if(time2 == 0.0) time2 = 5.0
  70.  
  71.     read_argv(3,arg,29)
  72.     new r = str_to_num(arg)
  73.  
  74.     read_argv(4,arg,29)
  75.     new g = str_to_num(arg)
  76.  
  77.     read_argv(5,arg,29)
  78.     new b = str_to_num(arg)
  79.  
  80.     read_argv(6,arg,29)
  81.     new type = read_flags(arg)
  82.     if(!type ) format(arg,29,"abcdefsz")
  83.    
  84.     shooter_spawn(id,time2,shots,r,g,b,arg)
  85.    
  86.     return PLUGIN_HANDLED;
  87. }
  88.  
  89. public shooter_spawn(id,Float:tasktime,shots,r,g,b,effects[]){
  90.     new Float:Origin[3]
  91.  
  92.     pev(id,pev_origin,Origin)
  93.  
  94.     new Ent = create_entity("info_target")
  95.     if (!Ent) return PLUGIN_HANDLED;
  96.    
  97.     engfunc(EngFunc_SetOrigin,Ent,Origin)
  98.     engfunc(EngFunc_SetModel,Ent,"models/w_rpgammo.mdl")
  99.     entity_set_string(Ent,EV_SZ_target,effects)
  100.     entity_set_string(Ent,EV_SZ_classname,"fireworks_shooter")
  101.     set_pev(Ent,pev_owner,id)
  102.     entity_set_int(Ent, EV_INT_movetype, MOVETYPE_TOSS)
  103.  
  104.     entity_set_int(Ent,EV_INT_iuser1,shots)
  105.     shots = entity_get_int(Ent,EV_INT_iuser1)
  106.     set_pev(Ent,pev_iuser2,r)
  107.     set_pev(Ent,pev_iuser3,g)
  108.     set_pev(Ent,pev_iuser4,b)
  109.  
  110.     dllfunc(DLLFunc_Spawn,Ent)
  111.  
  112.     if (has_drop) emit_sound(Ent, CHAN_WEAPON, "fireworks/weapondrop1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  113.     else emit_sound(Ent, CHAN_WEAPON, "items/weapondrop1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  114.  
  115.     set_task(tasktime,"shooter_think",Ent,"",0,"a",shots)
  116.  
  117.     return PLUGIN_HANDLED;
  118. }
  119.  
  120. public shooter_think(id){
  121.     new shots,r,g,b, effects[30], Float:origin[3]
  122.     shots = entity_get_int(id,EV_INT_iuser1)
  123.     pev(id,pev_iuser2,r)
  124.     pev(id,pev_iuser3,g)
  125.     pev(id,pev_iuser4,b)
  126.     entity_get_string(id,EV_SZ_target,effects,29)
  127.  
  128.     pev(id,pev_origin,origin)
  129.     origin[2] += 10
  130.     touch_effect(origin,255,255,255)
  131.  
  132.     fireworks_spawn(id,"firework_normal",effects,r,g,b)
  133.     shoot_firework(id)
  134.  
  135.     shots = shots - 1
  136.     if(shots < 1) detonate_shooter(id)
  137.     else set_pev(id,pev_iuser1,shots);
  138.  
  139.     return 1;
  140. }
  141.    
  142. public detonate_shooter(id){
  143.     explode(id)
  144.     remove_entity(id)
  145.     remove_task(id)
  146.  
  147.     return 1;
  148. }
  149.  
  150. public spawn_firework(id){
  151.     if(!check_fireworks(id,1)){
  152.         client_print(id,print_chat,"[FIRE] You are not allowed to throw more fireworks.")
  153.         return PLUGIN_HANDLED;
  154.     }
  155.     new arg[30],type2[30]
  156.  
  157.     read_argv(0,type2,29)
  158.     if(equali(type2,"firework")) format(type2,29,"firework_normal");
  159.  
  160.     read_argv(1,arg,29)
  161.     new r = str_to_num(arg)
  162.  
  163.     read_argv(2,arg,29)
  164.     new g = str_to_num(arg)
  165.  
  166.     read_argv(3,arg,29)
  167.     new b = str_to_num(arg)
  168.  
  169.     read_argv(4,arg,29)
  170.     new type = read_flags(arg)
  171.     if(!type ) format(arg,29,"abcdefsz")
  172.  
  173.     fireworks_spawn(id,type2,arg,r,g,b)
  174.    
  175.     return PLUGIN_HANDLED;
  176. }
  177.  
  178. public fireworks_spawn(id,type[],effects[],r,g,b) {
  179.     new Float:Origin[3]
  180.     new Float:Angles[3]
  181.  
  182.     Angles[0] = 90.0
  183.     Angles[1] = random_float(0.0,360.0)
  184.     Angles[2] = 0.0
  185.  
  186.     pev(id,pev_origin,Origin)
  187.  
  188.     new Float:Mins[3] = {-4.0, -4.0, -1.0}
  189.     new Float:Maxs[3] = {4.0, 4.0, 12.0}
  190.  
  191.     new Ent = create_entity("info_target")
  192.     if (!Ent) return PLUGIN_HANDLED;
  193.  
  194.     engfunc(EngFunc_SetOrigin,Ent,Origin)
  195.     engfunc(EngFunc_SetSize,Ent,Mins,Maxs)
  196.     engfunc(EngFunc_SetModel,Ent,"models/rpgrocket.mdl")
  197.  
  198.     entity_set_string(Ent,EV_SZ_classname,"nrm_fireworks")
  199.     entity_set_string(Ent,EV_SZ_target,effects)
  200.     entity_set_string(Ent,EV_SZ_targetname,type)
  201.     set_pev(Ent,pev_angles,Angles)
  202.     set_pev(Ent,pev_owner,id)
  203.     set_pev(Ent,pev_solid,3)
  204.     set_pev(Ent,pev_movetype,6)
  205.  
  206.     dllfunc(DLLFunc_Spawn,Ent)
  207.  
  208.     if(r != 0 || g != 0 || b != 0) client_cmd(id,"speak beep.wav")
  209.     else if (get_cvar_num("fireworks_colortype")) {
  210.         switch(random_num(0,6)) {
  211.             case 0: r = 255
  212.             case 1: g = 255
  213.             case 2: b = 255
  214.             case 3:
  215.             {
  216.                 g = 255
  217.                 b = 255
  218.             }
  219.             case 4:
  220.             {
  221.                 r = 255
  222.                 b = 255
  223.             }
  224.             case 5:
  225.             {
  226.                 r = 255
  227.                 g = 255
  228.             }
  229.             case 6:
  230.             {
  231.                 r = 255
  232.                 g = 128
  233.             }
  234.         }
  235.     }
  236.     else
  237.     {
  238.         r = random_num(0,255)
  239.         g = random_num(0,255)
  240.         b = random_num(0,255)
  241.     }
  242.     set_rendering(Ent,kRenderFxGlowShell,r,g,b,kRenderNormal,20)
  243.     set_pev(Ent,pev_iuser2,r)
  244.     set_pev(Ent,pev_iuser3,g)
  245.     set_pev(Ent,pev_iuser4,b)
  246.  
  247.     if (has_drop) emit_sound(Ent, CHAN_WEAPON, "fireworks/weapondrop1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  248.     else emit_sound(Ent, CHAN_WEAPON, "items/weapondrop1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  249.  
  250.     entity_set_float(Ent,EV_FL_nextthink,halflife_time() + 5.0)
  251.     if( (id < 33) && (id > -1) ) player_fireworks[id] += 1;
  252.  
  253.     return PLUGIN_HANDLED
  254. }
  255.  
  256. public shoot_firework(id){
  257.     detonate_fireworks(id,"firework_rc")
  258.     detonate_fireworks(id,"firework_rv")
  259.     detonate_fireworks(id,"firework_normal")
  260.     fireworks_shoot(id,"nrm_fireworks")
  261.    
  262.     return PLUGIN_HANDLED;
  263. }
  264.  
  265. public fireworks_shoot(id,class[]) {
  266.     new ent = find_ent_by_owner(-1,class,id,0);
  267.     if(!ent) return 0;
  268.  
  269.     while ( ent != 0 )
  270.     {
  271.         new tname[200]
  272.         entity_get_string(ent,EV_SZ_targetname,tname,199)
  273.  
  274.         entity_set_string(ent,EV_SZ_classname,tname)
  275.         set_pev(ent,pev_effects,64)
  276.  
  277.         emit_sound(ent, CHAN_WEAPON, "weapons/rocketfire1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  278.  
  279.         if (has_rocket) emit_sound(ent, CHAN_VOICE, "fireworks/rocket1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  280.         else emit_sound(ent, CHAN_VOICE, "weapons/rocket1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  281.  
  282.         new r,g,b
  283.         set_pev(ent,pev_iuser1,get_cvar_num("fireworks_maxlife"))
  284.         r = pev(ent,pev_iuser2)
  285.         g = pev(ent,pev_iuser3)
  286.         b = pev(ent,pev_iuser4)
  287.         set_pev(ent,pev_movetype,5)
  288.  
  289.         message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
  290.         write_byte(22)
  291.         write_short(ent)
  292.         write_short(sprSmoke)
  293.         write_byte(45)
  294.         write_byte(4)
  295.         write_byte(r)
  296.         write_byte(g)
  297.         write_byte(b)
  298.         write_byte(255)
  299.         message_end()
  300.  
  301.         new Float:vVelocity[3]
  302.         vVelocity[2] = random_float(400.0,1000.0)
  303.         set_pev(ent,pev_velocity,vVelocity)
  304.  
  305.         entity_set_float(ent,EV_FL_nextthink,halflife_time() + 0.1)
  306.  
  307.         ent = find_ent_by_owner(ent, class, id, 0);
  308.     }
  309.     return PLUGIN_HANDLED
  310. }
  311.  
  312. public detonate_fireworks(id,class[]) {
  313.     new ent = find_ent_by_owner(-1,class,id,0);
  314.     if(!ent) return 0;
  315.  
  316.     while ( ent != 0 )
  317.     {
  318.         explode(ent)
  319.         if( (id < 33) && (id > 0) ) attach_view(id,id)
  320.         new ent2 = find_ent_by_owner(ent, class, id, 0);
  321.         remove_entity(ent)
  322.         ent = ent2
  323.  
  324.     }
  325.     return PLUGIN_HANDLED
  326. }
  327.  
  328. public fireworks_think(id){
  329.     new classname[32], owner
  330.     owner = pev(id,pev_owner)
  331.     entity_get_string(id,EV_SZ_classname,classname,31)
  332.     if(equali(classname,"nrm_fireworks")){
  333.         set_pev(id,pev_velocity,{0.0,0.0,450.0})
  334.         entity_set_float(id,EV_FL_nextthink,halflife_time() + 5.0)
  335.     }
  336.     else if(equali(classname,"firework_normal")){
  337.         new Float:velo[3]
  338.         pev(id,pev_velocity,velo)
  339.  
  340.         new Float:x = get_cvar_float("fireworks_xvelocity")
  341.         new Float:y = get_cvar_float("fireworks_yvelocity")
  342.         velo[0] += random_float((-1.0*x),x)
  343.         velo[1] += random_float((-1.0*y),y)
  344.         velo[2] += random_float(10.0,200.0)
  345.         set_pev(id,pev_velocity,velo)
  346.         entity_set_float(id,EV_FL_nextthink,halflife_time() + 0.1)
  347.     }
  348.     else if(equali(classname,"firework_rc")){
  349.    
  350.         new Float:vOrigin[3]
  351.         new aimvec[3], uorigin[3]
  352.         entity_get_vector(id,EV_VEC_origin,vOrigin)
  353.         get_user_origin(owner,aimvec,3)
  354.  
  355.         make_dot(aimvec)
  356.  
  357.         uorigin[0] = floatround(vOrigin[0])
  358.         uorigin[1] = floatround(vOrigin[1])
  359.         uorigin[2] = floatround(vOrigin[2])
  360.  
  361.         new velocityvec[3],length
  362.         velocityvec[0]=aimvec[0]-uorigin[0]
  363.         velocityvec[1]=aimvec[1]-uorigin[1]
  364.         velocityvec[2]=aimvec[2]-uorigin[2]
  365.  
  366.         length=sqrt(velocityvec[0]*velocityvec[0]+velocityvec[1]*velocityvec[1]+velocityvec[2]*velocityvec[2])
  367.         velocityvec[0]=velocityvec[0]*1000/length
  368.         velocityvec[1]=velocityvec[1]*1000/length
  369.         velocityvec[2]=velocityvec[2]*1000/length
  370.  
  371.         new Float:fl_iNewVelocity[3], iNewVelocity[3]
  372.         iNewVelocity[0] = (velocityvec[0])
  373.         iNewVelocity[1] = (velocityvec[1])
  374.         iNewVelocity[2] = (velocityvec[2])
  375.  
  376.         fl_iNewVelocity[0] = iNewVelocity[0] + 0.0
  377.         fl_iNewVelocity[1] = iNewVelocity[1] + 0.0
  378.         fl_iNewVelocity[2] = iNewVelocity[2] + 0.0
  379.         entity_set_vector(id, EV_VEC_velocity, fl_iNewVelocity)
  380.         entity_set_float(id,EV_FL_nextthink,halflife_time() + 0.1)
  381.        
  382.     }
  383.     else if(equali(classname,"firework_rv")){
  384.         attach_view(owner,id)
  385.         new Float:fl_iNewVelocity[3]
  386.         velocity_by_aim(owner, 750, fl_iNewVelocity)
  387.         entity_set_vector(id, EV_VEC_velocity, fl_iNewVelocity)
  388.  
  389.         new Float:vAngles[3]
  390.         entity_get_vector(owner, EV_VEC_v_angle, vAngles)
  391.         entity_set_vector(id, EV_VEC_angles, vAngles)
  392.  
  393.         entity_set_float(id,EV_FL_nextthink,halflife_time() + 0.01)
  394.     }
  395.     return 1;
  396. }
  397.  
  398. public fireworks_touch(tid,id){
  399.     new classname[32]
  400.     entity_get_string(id,EV_SZ_classname,classname,31)
  401.  
  402.     new Float:origin[3]
  403.     pev(id,pev_origin,origin)
  404.  
  405.     new r = pev(id,pev_iuser2)
  406.     new g = pev(id,pev_iuser3)
  407.     new b = pev(id,pev_iuser4)
  408.  
  409.     if(equali(classname,"firework_normal")){
  410.         explode(id)
  411.         remove_entity(id)
  412.     }
  413.     else if(equali(classname,"firework_rc")){
  414.         new owner
  415.         owner = pev(id,pev_owner)
  416.         attach_view(owner,owner)
  417.         explode(id)
  418.         remove_entity(id)
  419.     }
  420.     else if(equali(classname,"firework_rv")){
  421.         new owner
  422.         owner = pev(id,pev_owner)
  423.         attach_view(owner,owner)
  424.         explode(id)
  425.         remove_entity(id)
  426.     }
  427.     else if(equali(classname,"nrm_fireworks")) emit_sound(id,CHAN_ITEM, "fvox/bell.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  428.  
  429.     touch_effect(origin,r,g,b)
  430.     return 1;
  431. }
  432.  
  433. public touch_effect(Float:Origin[3],r,g,b){
  434.     // blast circles
  435.     new origin[3];
  436.     origin[0] = floatround(Origin[0])
  437.     origin[1] = floatround(Origin[1])
  438.     origin[2] = floatround(Origin[2])
  439.  
  440.     message_begin( MSG_PAS, SVC_TEMPENTITY, origin );
  441.     write_byte( 21 );
  442.     write_coord( origin[0]);
  443.     write_coord( origin[1]);
  444.     write_coord( origin[2] + 16);
  445.     write_coord( origin[0]);
  446.     write_coord( origin[1]);
  447.     write_coord( origin[2] + 16 + 348); // reach damage radius over .3 seconds
  448.     write_short( shockwave );
  449.  
  450.     write_byte( 0 ); // startframe
  451.     write_byte( 0 ); // framerate
  452.     write_byte( 3 ); // life
  453.     write_byte( 30 );  // width
  454.     write_byte( 0 );   // noise
  455.  
  456.     write_byte(r)
  457.     write_byte(g)
  458.     write_byte(b)
  459.  
  460.     write_byte( 255 ); //brightness
  461.     write_byte( 0 );        // speed
  462.     message_end();
  463.  
  464.     message_begin( MSG_PAS, SVC_TEMPENTITY, origin );
  465.     write_byte( 21 );
  466.     write_coord( origin[0]);
  467.     write_coord( origin[1]);
  468.     write_coord( origin[2] + 16);
  469.     write_coord( origin[0]);
  470.     write_coord( origin[1]);
  471.     write_coord( origin[2] + 16 + ( 384 / 2 )); // reach damage radius over .3 seconds
  472.     write_short( shockwave );
  473.  
  474.     write_byte( 0 ); // startframe
  475.     write_byte( 0 ); // framerate
  476.     write_byte( 3 ); // life
  477.     write_byte( 30 );  // width
  478.     write_byte( 0 );   // noise
  479.  
  480.     write_byte(256-r)
  481.     write_byte(256-g)
  482.     write_byte(256-b)
  483.        
  484.     write_byte( 255 ); //brightness
  485.     write_byte( 0 );        // speed
  486.     message_end();
  487.  
  488.  
  489.     return 1;
  490. }
  491.  
  492. // Explode Function
  493. public explode(id) {
  494.     if(!id) return 0;
  495.     new Float:ent_origin2[3]
  496.     pev(id,pev_origin,ent_origin2)
  497.  
  498.     new owner
  499.     owner = pev(id,pev_owner)
  500.     if( (owner < 33) && (owner > -1) ) player_fireworks[owner]--
  501.    
  502.     new ent_origin[3];
  503.     new multi = get_cvar_num("fireworks_multiplier")
  504.     for(new i; i < 3; i++) ent_origin[i] = floatround(ent_origin2[i])
  505.  
  506.     new szType[64],type
  507.     entity_get_string(id,EV_SZ_target,szType,63)
  508.     type = read_flags(szType)
  509.  
  510.     new r = pev(id,pev_iuser2)
  511.     new g = pev(id,pev_iuser3)
  512.     new b = pev(id,pev_iuser4)
  513.  
  514.     if (type&(1<<0)) { //a -- Voogru Effect
  515.         message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
  516.         write_byte(20)              // TE_BEAMDISK
  517.         write_coord(ent_origin[0])          // coord coord coord (center position)
  518.         write_coord(ent_origin[1])
  519.         write_coord(ent_origin[2])
  520.         write_coord(0)          // coord coord coord (axis and radius)
  521.         write_coord(0)
  522.         write_coord(100)
  523.         switch(random_num(0,1)) {
  524.             case 0: write_short(sprFlare6)          // short (sprite index)
  525.             case 1: write_short(sprLightning)           // short (sprite index)
  526.         }
  527.         write_byte(0)               // byte (starting frame)
  528.         write_byte(0)               // byte (frame rate in 0.1's)
  529.         write_byte(50)              // byte (life in 0.1's)
  530.         write_byte(0)               // byte (line width in 0.1's)
  531.         write_byte(150)             // byte (noise amplitude in 0.01's)
  532.         write_byte(r)               // byte,byte,byte (color)
  533.         write_byte(g)
  534.         write_byte(b)
  535.         write_byte(255)             // byte (brightness)
  536.         write_byte(0)               // byte (scroll speed in 0.1's)
  537.         message_end()
  538.     }
  539.     if (type&(1<<1)){ //b -- Flares
  540.         if (get_cvar_num("fireworks_colortype")) {
  541.             message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
  542.             write_byte(15)              // TE_SPRITETRAIL
  543.             write_coord(ent_origin[0])          // coord, coord, coord (start)
  544.             write_coord(ent_origin[1])
  545.             write_coord(ent_origin[2]-20)
  546.             write_coord(ent_origin[0])          // coord, coord, coord (end)
  547.             write_coord(ent_origin[1])
  548.             write_coord(ent_origin[2]+20)
  549.             if ((r > 128) && (g < 127) && (b < 127)) write_short(sprRflare)
  550.             else if ((r < 127) && (g > 128) && (b < 127)) write_short(sprGflare)
  551.             else if ((r < 127) && (g < 127) && (b > 128)) write_short(sprBflare)
  552.             else if ((r < 127) && (g > 128) && (b > 128)) write_short(sprTflare)
  553.             else if ((r > 128) && (g < 127) && (b < 200) && (b > 100)) write_short(sprPflare)
  554.             else if ((r > 128) && (g > 128) && (b < 127)) write_short(sprYflare)
  555.             else if ((r > 128) && (g > 100) && (g < 200) && (b < 127))write_short(sprOflare)
  556.  
  557.             else write_short(sprBflare)
  558.             write_byte(get_cvar_num("fireworks_flare_count"))               // byte (count)
  559.             write_byte(10)              // byte (life in 0.1's)
  560.             write_byte(10)              // byte (scale in 0.1's)
  561.             write_byte(random_num(40,100))      // byte (velocity along vector in 10's)
  562.             write_byte(40)              // byte (randomness of velocity in 10's)
  563.             message_end()
  564.         }else{
  565.             message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
  566.             write_byte(15)              // TE_SPRITETRAIL
  567.             write_coord(ent_origin[0])          // coord, coord, coord (start)
  568.             write_coord(ent_origin[1])
  569.             write_coord(ent_origin[2]-20)
  570.             write_coord(ent_origin[0])          // coord, coord, coord (end)
  571.             write_coord(ent_origin[1])
  572.             write_coord(ent_origin[2]+20)
  573.             if ((r > 128) && (g < 127) && (b < 127)) write_short(sprRflare)
  574.             else if ((r < 127) && (g > 128) && (b < 127)) write_short(sprGflare)
  575.             else if ((r < 127) && (g < 127) && (b > 128)) write_short(sprBflare)
  576.             else if ((r < 127) && (g > 128) && (b > 128)) write_short(sprTflare)
  577.             else if ((r > 128) && (g < 127) && (b < 200) && (b > 100)) write_short(sprPflare)
  578.             else if ((r > 128) && (g > 128) && (b < 127)) write_short(sprYflare)
  579.             else if ((r > 128) && (g > 100) && (g < 200) && (b < 127))write_short(sprOflare)
  580.             else write_short(sprBflare)
  581.  
  582.             write_byte(get_cvar_num("fireworks_flare_count"))               // byte (count)
  583.             write_byte(2)               // byte (life in 0.1's)
  584.             write_byte(5)               // byte (scale in 0.1's)
  585.             write_byte(random_num(40,100))      // byte (velocity along vector in 10's)
  586.             write_byte(40)              // byte (randomness of velocity in 10's)
  587.             message_end()
  588.         }
  589.     }
  590.     if (type&(1<<2)) { //c -- Falling flares
  591.         new velo = random_num(30,70)
  592.         new spr
  593.         new choosespr = random_num(0,3)
  594.  
  595.         switch(choosespr)
  596.         {
  597.             case 0: spr = flare3
  598.             case 1: spr = sprBflare
  599.             case 2: spr = sprFlare6
  600.             case 3: spr = sprRflare
  601.         }
  602.  
  603.         //TE_SPRITETRAIL
  604.         message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
  605.         write_byte (15) // line of moving glow sprites with gravity, fadeout, and collisions
  606.         write_coord(ent_origin[0])          // coord, coord, coord (start)
  607.         write_coord(ent_origin[1])
  608.         write_coord(ent_origin[2])
  609.         write_coord(ent_origin[0])          // coord, coord, coord (start)
  610.         write_coord(ent_origin[1])
  611.         write_coord(ent_origin[2]-80)
  612.         write_short(spr) // (sprite index)
  613.         write_byte(50*multi) // (count)
  614.         write_byte(random_num(1,3)) // (life in 0.1's)
  615.         write_byte(10) // byte (scale in 0.1's)
  616.         write_byte(velo) // (velocity along vector in 10's)
  617.         write_byte(40) // (randomness of velocity in 10's)
  618.  
  619.         message_end()
  620.     }
  621.     if (type&(1<<3)) { //d - lightening
  622.         //Lightning
  623.         message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
  624.         write_byte( 0 )
  625.         write_coord(ent_origin[0])          // coord, coord, coord (start)
  626.         write_coord(ent_origin[1])
  627.         write_coord(ent_origin[2]-50)
  628.         write_coord(ent_origin[0])          // coord, coord, coord (End)
  629.         write_coord(ent_origin[1])
  630.         write_coord((ent_origin[2]-2000))
  631.         write_short( sprLightning )
  632.         write_byte( 1 ) // framestart
  633.         write_byte( 5 ) // framerate
  634.         write_byte( 3 ) // life
  635.         write_byte( 150*multi ) // width
  636.         write_byte( 30 ) // noise
  637.         write_byte( 200 ) // r, g, b
  638.         write_byte( 200 ) // r, g, b
  639.         write_byte( 200 ) // r, g, b
  640.         write_byte( 200 ) // brightness
  641.         write_byte( 100 ) // speed
  642.         message_end()
  643.  
  644.         //Sparks
  645.         message_begin( MSG_PVS, SVC_TEMPENTITY)
  646.         write_byte( 9 )
  647.         write_coord(ent_origin[0])          // coord, coord, coord (start)
  648.         write_coord(ent_origin[1])
  649.         write_coord((ent_origin[2]-1000))
  650.         message_end()  
  651.     }
  652.     if (type&(1<<4)) { //e -- Lights
  653.         message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
  654.         write_byte(27)
  655.         write_coord(ent_origin[0])          // coord, coord, coord (start)
  656.         write_coord(ent_origin[1])
  657.         write_coord(ent_origin[2])
  658.         write_byte(60)          // byte (radius in 10's)
  659.         write_byte(r)           // byte byte byte (color)
  660.         write_byte(g)
  661.         write_byte(b)
  662.         write_byte(100)         // byte (life in 10's)
  663.         write_byte(15)          // byte (decay rate in 10's)
  664.         message_end()
  665.     }
  666.     if (type&(1<<5)) { //f -- Effect upward
  667.         message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
  668.         write_byte( 100 );
  669.         write_coord( ent_origin[0] );
  670.         write_coord( ent_origin[1] );
  671.         write_coord( ent_origin[2] - 64);
  672.         write_short(sprFlare6);
  673.         write_short(1);
  674.         message_end();
  675.     }
  676.     if (type&(1<<6)) { //g -- Throw ents
  677.         new velo = random_num(300,700)
  678.  
  679.         //define TE_EXPLODEMODEL
  680.         message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
  681.         write_byte(107) // spherical shower of models, picks from set
  682.         write_coord(ent_origin[0])          // coord, coord, coord (start)
  683.         write_coord(ent_origin[1])
  684.         write_coord(ent_origin[2]-50)
  685.         write_coord(velo) //(velocity)
  686.         write_short (garbgibs) //(model index)
  687.         write_short (25*multi) // (count)
  688.         write_byte (15) // (life in 0.1's)     
  689.         message_end()
  690.     }
  691.     if (type&(1<<7)) { //h
  692.         //TE_TAREXPLOSION
  693.         message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
  694.         write_byte( 4) // Quake1 "tarbaby" explosion with sound
  695.         write_coord(ent_origin[0])          // coord, coord, coord (start)
  696.         write_coord(ent_origin[1])
  697.         write_coord((ent_origin[2]-40))
  698.         message_end()
  699.     }
  700.     if (type&(1<<8)) { //i
  701.         new color = random_num(0,255)
  702.         new width = random_num(400,1000)
  703.         //TE_PARTICLEBURST
  704.         message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
  705.         write_byte(122) // very similar to lavasplash.
  706.         write_coord(ent_origin[0])          // coord, coord, coord (start)
  707.         write_coord(ent_origin[1])
  708.         write_coord(ent_origin[2])
  709.         write_short (width)
  710.         write_byte (color) // (particle color)
  711.         write_byte (40) // (duration * 10) (will be randomized a bit)
  712.         message_end()
  713.     }
  714.     if (type&(1<<9)) { //j...for random...blood
  715.         message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
  716.         write_byte( 10 )
  717.         write_coord(ent_origin[0])          // coord, coord, coord (start)
  718.         write_coord(ent_origin[1])
  719.         write_coord(ent_origin[2])
  720.         message_end()
  721.     }
  722.     if (type&(1<<10)) { //k
  723.         message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
  724.         write_byte(14)
  725.         write_coord(ent_origin[0])
  726.         write_coord(ent_origin[1])
  727.         write_coord((ent_origin[2]-100))
  728.         write_byte(5000) // radius
  729.         write_byte(80)
  730.         write_byte(20)
  731.         message_end()
  732.     }
  733.     if (type&(1<<11))  { //l Sprite field
  734.         message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
  735.         write_byte(123);
  736.         write_coord(ent_origin[0])          // coord, coord, coord (start)
  737.         write_coord(ent_origin[1])
  738.         write_coord(ent_origin[2])
  739.         write_short(256);
  740.         if ((r > 128) && (g < 127) && (b < 127)) write_short(sprRflare)
  741.         else if ((r < 127) && (g > 128) && (b < 127)) write_short(sprGflare)
  742.         else if ((r < 127) && (g < 127) && (b > 128)) write_short(sprBflare)
  743.         else if ((r < 127) && (g > 128) && (b > 128)) write_short(sprTflare)
  744.         else if ((r > 128) && (g < 127) && (b < 200) && (b > 100)) write_short(sprPflare)
  745.         else if ((r > 128) && (g > 128) && (b < 127)) write_short(sprYflare)
  746.         else if ((r > 128) && (g > 100) && (g < 200) && (b < 127))write_short(sprOflare)
  747.         else write_short(sprBflare)
  748.         write_byte(10);
  749.         write_byte(1);
  750.         write_byte(20);
  751.         message_end()
  752.     }
  753.     if (type&(1<<18)) { //s
  754.         message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
  755.         write_byte(20)              // TE_BEAMDISK
  756.         write_coord(ent_origin[0])          // coord coord coord (center position)
  757.         write_coord(ent_origin[1])
  758.         write_coord(ent_origin[2])
  759.         write_coord(ent_origin[0])          // coord coord coord (axis and radius)
  760.         write_coord(ent_origin[1])
  761.         write_coord(ent_origin[2]+random_num(250,750))
  762.         switch(random_num(0,1)) {
  763.             case 0: write_short(sprFlare6)          // short (sprite index)
  764.             case 1: write_short(sprLightning)           // short (sprite index)
  765.         }
  766.         write_byte(0)               // byte (starting frame)
  767.         write_byte(0)               // byte (frame rate in 0.1's)
  768.         write_byte(25)              // byte (life in 0.1's)
  769.         write_byte(150)             // byte (line width in 0.1's)
  770.         write_byte(0)               // byte (noise amplitude in 0.01's)
  771.         write_byte(r)               // byte,byte,byte (color)
  772.         write_byte(g)
  773.         write_byte(b)
  774.         write_byte(255)             // byte (brightness)
  775.         write_byte(0)               // byte (scroll speed in 0.1's)
  776.         message_end()
  777.     }
  778.     if (type&(1<<19)) { //t
  779.         message_begin( MSG_BROADCAST, SVC_TEMPENTITY )
  780.         write_byte( 17 )
  781.         write_coord( ent_origin[0] )
  782.         write_coord( ent_origin[1] )
  783.         write_coord( ent_origin[2] )
  784.         write_short( sprSmoke )
  785.         write_byte( 10 )
  786.         write_byte( 150 )
  787.         message_end( )
  788.     }
  789.     if (type&(1<<20)) { //u
  790.         message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
  791.         write_byte( 21 )
  792.         write_coord(ent_origin[0])          // coord, coord, coord (start)
  793.         write_coord(ent_origin[1])
  794.         write_coord(ent_origin[2]-70)
  795.         write_coord(ent_origin[0])          // coord, coord, coord (start)
  796.         write_coord(ent_origin[1])
  797.         write_coord(ent_origin[2]+136)
  798.         write_short( white )
  799.         write_byte( 0 ) // startframe
  800.         write_byte( 0 ) // framerate
  801.         write_byte( 2 ) // life 2
  802.         write_byte( 20 ) // width 16
  803.         write_byte( 0 ) // noise
  804.         write_byte( 188 ) // r
  805.         write_byte( 220 ) // g
  806.         write_byte( 255 ) // b
  807.         write_byte( 255 ) //brightness
  808.         write_byte( 0 ) // speed
  809.         message_end()
  810.  
  811.         //Explosion2
  812.         message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
  813.         write_byte( 12 )
  814.         write_coord(ent_origin[0])          // coord, coord, coord (start)
  815.         write_coord(ent_origin[1])
  816.         write_coord(ent_origin[2])
  817.         write_byte( 188 ) // byte (scale in 0.1's) 188
  818.         write_byte( 10 ) // byte (framerate)
  819.         message_end()
  820.  
  821.         //TE_Explosion
  822.         message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
  823.         write_byte( 3 )
  824.         write_coord(ent_origin[0])          // coord, coord, coord (start)
  825.         write_coord(ent_origin[1])
  826.         write_coord(ent_origin[2])
  827.         write_short( fire )
  828.         write_byte( 60 ) // byte (scale in 0.1's) 188
  829.         write_byte( 10 ) // byte (framerate)
  830.         write_byte( 0 ) // byte flags
  831.         message_end()
  832.  
  833.         //Smoke
  834.         message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
  835.         write_byte( 5 ) // 5
  836.         write_coord(ent_origin[0])          // coord, coord, coord (start)
  837.         write_coord(ent_origin[1])
  838.         write_coord(ent_origin[2])
  839.         write_short( sprSmoke )
  840.         write_byte( 10 ) // 2
  841.         write_byte( 10 ) // 10
  842.         message_end()
  843.     }
  844.  
  845.     if (type&(1<<21)) emit_sound(id,CHAN_ITEM, "ambience/thunder_clap.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)//v
  846.     if (type&(1<<22)) emit_sound(id, CHAN_VOICE, "weapons/explode3.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) // w
  847.     if (type&(1<<23)) emit_sound(id, CHAN_VOICE, "weapons/explode4.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) //x
  848.     if (type&(1<<24)) emit_sound(id, CHAN_VOICE, "weapons/explode5.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) //y
  849.     if (type&(1<<25)) emit_sound(id, CHAN_VOICE, "weapons/mortarhit.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) //z
  850.  
  851.     return 1;
  852. }
  853.  
  854. public remove_fireworks(id){
  855.     player_fireworks[id] = 0;
  856.     remove_by_class(id,"nrm_fireworks")
  857.     remove_by_class(id,"firework_normal")
  858.     remove_by_class(id,"firework_rv")
  859.     remove_by_class(id,"firework_rc")
  860.  
  861.     return PLUGIN_HANDLED;
  862. }
  863.  
  864. public remove_shooters(id){
  865.     remove_by_class(id,"fireworks_shooter")
  866.     return PLUGIN_HANDLED;
  867. }
  868.  
  869. public amx_remove_fireworks(id){
  870.     if(!access(id,ADMIN_ADMIN)) return 0;
  871.     remove_entity_name("nrm_fireworks")
  872.     remove_entity_name("firework_normal")
  873.     remove_entity_name("firework_rv")
  874.     remove_entity_name("firework_rc")
  875.     for(new i=0; i < 33; i++) player_fireworks[i] = 0;
  876.  
  877.     return PLUGIN_HANDLED;
  878. }
  879.  
  880. public amx_remove_shooters(id){
  881.     if(!access(id,ADMIN_ADMIN)) return 0;
  882.     remove_entity_name("fireworks_shooter")
  883.     return PLUGIN_HANDLED;
  884. }
  885.  
  886. public remove_by_class(id,class[]){
  887.     new ent = find_ent_by_owner(-1,class,id,0);
  888.     if(!ent) return 0;
  889.  
  890.     while ( ent != 0 )
  891.     {
  892.         new ent2 = find_ent_by_owner(ent, class, id, 0);
  893.         remove_task(ent)
  894.         remove_entity(ent)
  895.         ent = ent2
  896.  
  897.     }
  898.     return 1;
  899. }
  900.  
  901. public sqrt(num)
  902. {
  903.     // Cool - Newton's Method - Ludwig
  904.     new div = num, result = 1
  905.     while (div > result)
  906.     {  // end when div == result, or just below
  907.         div = (div + result) / 2 // take mean value as new divisor
  908.         result = num / div
  909.     }
  910.     return div
  911. }
  912.  
  913. public make_dot(vec[])
  914. {
  915.     message_begin( MSG_BROADCAST,SVC_TEMPENTITY)  
  916.     write_byte( 17 )
  917.     write_coord(vec[0])
  918.     write_coord(vec[1])
  919.     write_coord(vec[2])
  920.     write_short( ls_dot )
  921.     write_byte( 10 )
  922.     write_byte( 255 )
  923.     message_end()
  924. }
  925.  
  926. public plugin_precache() {
  927.     precache_sound("weapons/explode3.wav") 
  928.     precache_sound("weapons/explode4.wav")
  929.     precache_sound("weapons/explode5.wav")
  930.  
  931.     precache_sound("weapons/rocketfire1.wav")
  932.     precache_sound("weapons/mortarhit.wav")
  933.     precache_sound( "ambience/thunder_clap.wav")
  934.  
  935.     flare3 = precache_model("sprites/flare3.spr")
  936.     garbgibs = precache_model("models/garbagegibs.mdl")
  937.     //l_tube = precache_model("models/w_flare.mdl")
  938.  
  939.     if (file_exists("sound/fireworks/rocket1.wav")) {
  940.         precache_sound("fireworks/rocket1.wav")
  941.         has_rocket = 1
  942.     } else {
  943.         precache_sound("weapons/rocket1.wav")
  944.         has_rocket = 0
  945.     }
  946.  
  947.     if (file_exists("sound/fireworks/weapondrop1.wav")) {
  948.         precache_sound("fireworks/weapondrop1.wav")
  949.         has_drop = 1
  950.     } else {
  951.         precache_sound("items/weapondrop1.wav")
  952.         has_drop = 0
  953.     }
  954.  
  955.     precache_model("models/rpgrocket.mdl")
  956.     precache_model("models/w_rpgammo.mdl")
  957.  
  958.     sprSmoke = precache_model("sprites/smoke.spr")
  959.     sprFlare6 = precache_model("sprites/Flare6.spr")
  960.     sprLightning = precache_model("sprites/lgtning.spr")
  961.     white = precache_model("sprites/white.spr")
  962.     fire = precache_model("sprites/explode1.spr")
  963.  
  964.     sprBflare = precache_model("sprites/fireworks/bflare.spr")
  965.     sprRflare = precache_model("sprites/fireworks/rflare.spr")
  966.     sprGflare = precache_model("sprites/fireworks/gflare.spr")
  967.     sprTflare = precache_model("sprites/fireworks/tflare.spr")
  968.     sprOflare = precache_model("sprites/fireworks/oflare.spr")
  969.     sprPflare = precache_model("sprites/fireworks/pflare.spr")
  970.     sprYflare = precache_model("sprites/fireworks/yflare.spr")
  971.     ls_dot = precache_model("sprites/laserdot.spr")
  972.  
  973.     precache_sound("fvox/bell.wav");
  974.     shockwave = precache_model("sprites/shockwave.spr")
  975.  
  976.     return PLUGIN_CONTINUE
  977. }
  978.  
  979.  
  980. public fireworks_menu(id) {
  981.     new amount;
  982.     if(check_fireworks(id,1) == 0){
  983.         shoot_firework(id)
  984.         client_print(id,print_chat,"[FIRE] You are not allowed to use the menu.")
  985.         return PLUGIN_HANDLED;
  986.     }      
  987.  
  988.     if(access(id,ADMIN_ADMIN)) amount = get_cvar_num("fireworks_amaxcount")
  989.     else amount = get_cvar_num("fireworks_maxcount")
  990.  
  991.     new menu[1024]
  992.     format(menu,sizeof(menu),"Fireworks Menu: (%i of %i)^n^n",player_fireworks[id],amount)
  993.     add(menu,sizeof(menu),"1. Spawn Normal Rocket^n")
  994.     add(menu,sizeof(menu),"2. Spawn Laser Guided Rocket^n")
  995.     add(menu,sizeof(menu),"3. Spawn Remote View Rocket^n^n")
  996.     add(menu,sizeof(menu),"4. Fire Rockets^n")
  997.     add(menu,sizeof(menu),"5. Spawn Shooter^n^n")
  998.     add(menu,sizeof(menu),"6. Remove All Your Rockets^n")
  999.     add(menu,sizeof(menu),"7. Remove All Your Shooters^n^n")
  1000.     add(menu,sizeof(menu),"0. Cancel^n")
  1001.  
  1002.     show_menu(id,1023,menu)
  1003.  
  1004.     return PLUGIN_HANDLED;
  1005. }
  1006.  
  1007. public fireworks_keys(id,key){
  1008.     switch(key){
  1009.         case 0: fireworks_spawn(id,"firework_normal","abcdefsz",0,0,0)
  1010.         case 1: fireworks_spawn(id,"firework_rc","abcdefsz",0,0,0)
  1011.         case 2: fireworks_spawn(id,"firework_rv","abcdefsz",0,0,0)
  1012.         case 3: shoot_firework(id)
  1013.         case 4:
  1014.         {
  1015.             if(check_fireworks(id,0)) shooter_spawn(id,5.0,5,0,0,0,"abcdz")
  1016.             else {
  1017.                 client_print(id,print_chat,"[FIRE] You cannot spawn shooters")
  1018.                 return 0;
  1019.             }
  1020.         }
  1021.         case 5: remove_fireworks(id);
  1022.         case 6: remove_shooters(id);
  1023.         case 7: return 0;
  1024.         case 8: return 0;
  1025.         case 9: return 0;
  1026.  
  1027.     }
  1028.     fireworks_menu(id)
  1029.     return PLUGIN_HANDLED;
  1030. }
  1031.    
  1032.  
  1033. public client_connect(id){
  1034.     player_fireworks[id] = 0;
  1035.     allowed_fireworks[id] = false;
  1036. }
  1037.  
  1038. public client_putinserver(id) if (!is_user_bot(id)) set_task(15.0,"display_info",id)
  1039.  
  1040. public display_info(id)
  1041. {
  1042.     client_print(id,print_chat,"Simply say 'fireworks' to open the fireworks menu")
  1043.     client_cmd(id,"bind 1 slot1")
  1044.     client_cmd(id,"bind 2 slot2")
  1045.     client_cmd(id,"bind 3 slot3")
  1046.     client_cmd(id,"bind 4 slot4")
  1047.     client_cmd(id,"bind 5 slot5")
  1048.     client_cmd(id,"bind 6 slot6")
  1049.     client_cmd(id,"bind 7 slot7")
  1050.     client_cmd(id,"bind 8 slot8")
  1051.     client_cmd(id,"bind 9 slot9")
  1052.     client_cmd(id,"bind 0 slot10")
  1053. }
  1054.  
  1055. public handle_say(id) {
  1056.     new arg1[32]
  1057.     new arg2[32]
  1058.     read_argv(1,arg1,sizeof(arg1))
  1059.     read_argv(2,arg2,sizeof(arg2))
  1060.  
  1061.     if (equali(arg1,"fireworks menu") || equali(arg1,"fireworks_menu") || equali(arg1,"fireworks"))
  1062.         fireworks_menu(id)
  1063.  
  1064.     return PLUGIN_CONTINUE
  1065. }
  1066.  
  1067.  
  1068. public changelights(id)
  1069. {
  1070.    
  1071.     new arg[3]
  1072.     read_argv(1,arg,2)
  1073.     set_lights(arg)
  1074.     console_print(id,"[AMXX] Light Change Successful.")
  1075.  
  1076.     return PLUGIN_HANDLED
  1077. }
  1078.  
  1079.  
  1080.  
  1081. public plugin_modules()
  1082. {
  1083.     require_module("FakeMeta")
  1084.     require_module("Engine")
  1085. }
  1086.  
  1087. public plugin_init() {
  1088.     register_plugin("Fireworks++","2.5","The Pro")
  1089.  
  1090.     register_menucmd(register_menuid("Fireworks Menu:"),1023,"fireworks_keys")
  1091.  
  1092.     register_think("nrm_fireworks","fireworks_think");
  1093.     register_think("firework_rc","fireworks_think");
  1094.     register_think("firework_rv","fireworks_think");
  1095.     register_think("firework_normal","fireworks_think");
  1096.  
  1097.     register_touch("*","firework_rc","fireworks_touch");
  1098.     register_touch("*","firework_rv","fireworks_touch");
  1099.     register_touch("*","firework_normal","fireworks_touch");
  1100.     register_touch("*","nrm_fireworks","fireworks_touch");
  1101.  
  1102.     register_concmd("say","handle_say")
  1103.     register_srvcmd("set_lights","changelights")
  1104.     register_concmd("firework","spawn_firework")
  1105.     register_concmd("firework_rv","spawn_firework")
  1106.     register_concmd("firework_rc","spawn_firework")
  1107.  
  1108.     register_concmd("firework_shooter","spawn_shooter")
  1109.     register_concmd("shoot_fireworks","shoot_firework")
  1110.  
  1111.     register_concmd("fireworks_password","check_password")
  1112.  
  1113.     register_concmd("remove_fireworks","remove_fireworks")
  1114.     register_concmd("remove_shooters","remove_shooters")
  1115.  
  1116.     register_concmd("amx_remove_fireworks","amx_remove_fireworks")
  1117.     register_concmd("amx_remove_shooters","amx_remove_shooters")
  1118.  
  1119.     register_cvar("fireworks_enable","1")
  1120.     register_cvar("fireworks_flare_count","30")
  1121.     register_cvar("fireworks_maxcount","4")
  1122.     register_cvar("fireworks_amaxcount","16")
  1123.     register_cvar("fireworks_colortype","0")
  1124.     register_cvar("fireworks_multiplier","2")
  1125.  
  1126.     register_cvar("fireworks_xvelocity","100")
  1127.     register_cvar("fireworks_yvelocity","100")
  1128.  
  1129.     register_cvar("fireworks","tsx")
  1130. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement