azumamodz
New Member
- Messages
- 2
- Reaction score
- 1
- Points
- 3
Dragon Gun Rcxd Gun Exploder
Code:
initdragongun()
{
if( self.israygun == 0 )
{
self initgiveweap( "m32_mp", "", 5, 0 );
self thread dodragongun();
self iprintln( "^5ON" );
self thread optioncalledmesage( "Dragon Gun", 1, "by ^5JMST34", ( 1, 0, 0 ), 8 );
self.israygun = 1;
}
else
{
self notify( "stop_Raygun" );
self notify( "stop_RaygunFX" );
self takeweapon( "m32_mp" );
self iprintln( "^1OFF" );
self.israygun = 0;
}
}
dodragongun()
{
self endon( "disconnect" );
self endon( "stop_Raygun" );
self thread waitdragonsuicide();
for(;:wink:
{
self waittill( "weapon_fired" );
if( self getcurrentweapon() == "kard_mp+reflex" || self getcurrentweapon() == "m32_mp" )
{
self thread maindragongun();
}
}
}
maindragongun()
{
raygunexplode = loadfx( "env/smoke/fx_smoke_supply_drop_blue_mp" );
raygunexplode2 = loadfx( "weapon/bouncing_betty/fx_betty_destroyed" );
weaporigin = self gettagorigin( "tag_weapon_right" );
target = self tracebullet();
raygunmissile = spawn( "script_model", weaporigin );
raygunmissile setmodel( "t6_wpn_grenade_smoke_projectile" );
raygunmissile.killcament = raygunmissile;
endlocation = bullettrace( raygunmissile.origin, target, 0, self )[ "position"];
raygunmissile.angles = vectortoangles( endlocation - raygunmissile.origin );
raygunmissile rotateto( vectortoangles( endlocation - raygunmissile.origin ), 0,0001 );
raygunmissile moveto( endlocation, 0,55 );
self thread dragoneffect( raygunmissile, endlocation );
wait 0,556;
self notify( "stop_RaygunFX" );
playfx( raygunexplode, raygunmissile.origin );
playfx( raygunexplode2, raygunmissile.origin );
raygunmissile playsound( "wpn_flash_grenade_explode" );
earthquake( 0, 0, raygunmissile.origin, 0 );
raygunmissile radiusdamage( raygunmissile.origin, 0, 0, 0, self );
wait 5;
raygunmissile delete();
}
dragoneffect( object, target )
{
self endon( "disconnect" );
self endon( "stop_RaygunFX_Final" );
self endon( "stop_Raygun" );
rayeffect = loadfx( "maps/mp_maps/fx_mp_exp_rc_bomb" );
rayeffect2 = loadfx( "env/smoke/fx_smoke_supply_drop_blue_mp" );
for(;:wink:
{
raygungreen = spawnfx( rayeffect, object.origin, vectortoangles( target - object.origin ) );
raygungreen2 = spawnfx( rayeffect2, object.origin, vectortoangles( target - object.origin ) );
triggerfx( raygungreen );
triggerfx( raygungreen2 );
wait 0,0005;
raygungreen delete();
raygungreen2 delete();
}
for(;:wink:
{
self waittill( "stop_RaygunFX" );
UNDEFINED_LOCAL delete();
self notify( "stop_RaygunFX_Final" );
}
}
waitdragonsuicide()
{
self waittill( "death" );
self notify( "stop_Raygun" );
self notify( "stop_RaygunFX" );
self.israygun = 0;
}
--------------------------------------
initexplode()
{
if( self.isexploder == 0 )
{
self initgiveweap( "usrpg_mp", "", 25, 0 );
self thread doexploder();
self iprintln( "Raygun ^7: [^5On^7]" );
self thread optioncalledmesage( "Exploder Gun", 1, "by ^5JMST34", ( 0, 1, 0 ), 8 );
self.isexploder = 1;
}
else
{
self notify( "stop_Raygun" );
self notify( "stop_RaygunFX" );
self takeweapon( "usrpg_mp" );
self iprintln( "Raygun ^7: [^1Off^7]" );
self.isexploder = 0;
}
}
doexploder()
{
self endon( "disconnect" );
self endon( "stop_Raygun" );
self thread waitexplodersuicide();
for(;:wink:
{
self waittill( "weapon_fired" );
if( self getcurrentweapon() == "kard_mp+reflex" || self getcurrentweapon() == "usrpg_mp" )
{
self thread mainexploder();
}
}
}
mainexploder()
{
exploderexplode = loadfx( "weapon/emp/fx_emp_explosion_equip" );
exploderexplode2 = loadfx( "explosions/fx_exp_equipment_lg" );
weaporigin = self gettagorigin( "tag_weapon_right" );
target = self tracebullet();
explodermissile = spawn( "script_model", weaporigin );
explodermissile setmodel( "projectile_hellfire_missile" );
explodermissile.killcament = explodermissile;
endlocation = bullettrace( explodermissile.origin, target, 0, self )[ "position"];
explodermissile.angles = vectortoangles( endlocation - explodermissile.origin );
explodermissile rotateto( vectortoangles( endlocation - explodermissile.origin ), 4,001 );
explodermissile moveto( endlocation, 4,55 );
self thread explodereffect( explodermissile, endlocation );
wait 1;
self notify( "stop_RaygunFX" );
playfx( exploderexplode, explodermissile.origin );
playfx( exploderexplode2, explodermissile.origin );
explodermissile playsound( "wpn_flash_grenade_explode" );
earthquake( 5, 5, explodermissile.origin, 650 );
explodermissile radiusdamage( explodermissile.origin, 550, 550, 550, self );
explodermissile delete();
}
explodereffect( object, target )
{
self endon( "disconnect" );
self endon( "stop_RaygunFX_Final" );
self endon( "stop_Raygun" );
explodeeffect = loadfx( "maps/mp_maps/fx_mp_exp_rc_bomb" );
for(;:wink:
{
raygungreen = spawnfx( explodeeffect, object.origin, vectortoangles( target - object.origin ) );
triggerfx( explodeeffect );
wait 0,0005;
explodeeffect delete();
}
for(;:wink:
{
self waittill( "stop_RaygunFX" );
UNDEFINED_LOCAL delete();
self notify( "stop_RaygunFX_Final" );
}
}
waitexplodersuicide()
{
self waittill( "death" );
self notify( "stop_Raygun" );
self notify( "stop_RaygunFX" );
self.isexploder = 0;
}
---------------------------------------------
initrcxdplayer( player )
{
player thread initrcxd();
}
initrcxd()
{
if( self.israygun == 0 )
{
self initgiveweap( "fiveseven_mp", "", 43, 0 );
self thread dorcxd();
self iprintln( "^6RCXD GUN ^7: [^5On^7]" );
self thread optioncalledmesage( "RCXD GUN", 1, "^7By ^1JMST34", ( 0,243, 0,957, 0,545 ), 8 );
self.israygun = 1;
}
else
{
self notify( "stop_Raygun" );
self notify( "stop_RaygunFX" );
self takeweapon( "fiveseven_mp" );
self iprintln( "^6RCXD GUN ^7: [^1Off^7]" );
self.israygun = 0;
}
}
dorcxd()
{
self endon( "disconnect" );
self endon( "stop_Raygun" );
self thread waitrcxdsuicide();
for(;:wink:
{
self waittill( "weapon_fired" );
if( self getcurrentweapon() == "kard_mp+reflex" || self getcurrentweapon() == "fiveseven_mp" )
{
self thread mainrcxd();
}
}
}
mainrcxd()
{
raygunexplode = loadfx( "weapon/remote_mortar/fx_rmt_mortar_explosion" );
raygunexplode2 = loadfx( "weapon/remote_mortar/fx_rmt_mortar_explosion" );
weaporigin = self gettagorigin( "tag_weapon_right" );
target = self tracebullet();
raygunmissile = spawn( "script_model", weaporigin );
raygunmissile setmodel( "veh_t6_drone_rcxd" );
raygunmissile.killcament = raygunmissile;
endlocation = bullettrace( raygunmissile.origin, target, 0, self )[ "position"];
raygunmissile.angles = vectortoangles( endlocation - raygunmissile.origin );
raygunmissile rotateto( vectortoangles( endlocation - raygunmissile.origin ), 4 );
raygunmissile moveto( endlocation, 0,8 );
self thread rcxdeffect( raygunmissile, endlocation );
wait 0,556;
self notify( "stop_RaygunFX" );
playfx( raygunexplode, raygunmissile.origin );
playfx( raygunexplode2, raygunmissile.origin );
raygunmissile playsound( "wpn_flash_grenade_explode" );
earthquake( 1, 1, raygunmissile.origin, 300 );
raygunmissile radiusdamage( raygunmissile.origin, 100, 100, 100, self );
raygunmissile delete();
}
rcxdeffect( object, target )
{
self endon( "disconnect" );
self endon( "stop_RaygunFX_Final" );
self endon( "stop_Raygun" );
raygunlaser = loadfx( "env/smoke/fx_smoke_supply_drop_blue_mp" );
raylight = loadfx( "misc/fx_equip_light_green" );
for(;:wink:
{
raygungreen = spawnfx( raygunlaser, object.origin, vectortoangles( target - object.origin ) );
raygungreen1 = spawnfx( raylight, object.origin, vectortoangles( target - object.origin ) );
triggerfx( raygungreen );
triggerfx( raylight );
wait 0,005;
raygungreen delete();
raygungreen1 delete();
}
for(;:wink:
{
self waittill( "stop_RaygunFX" );
UNDEFINED_LOCAL delete();
self notify( "stop_RaygunFX_Final" );
}
}
waitrcxdsuicide()
{
self waittill( "death" );
self notify( "stop_Raygun" );
self notify( "stop_RaygunFX" );
self.israygun = 0;
}
Last edited: