Files
IL-GSC/BO1/PC/ZM/clientscripts/_zombiemode_weap_sniper_explosive.csc
2024-02-18 17:32:07 -05:00

45 lines
1.1 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include clientscripts\_utility;
#include clientscripts\_fx;
init()
{
if ( GetDvar( #"createfx" ) == "on" )
{
return;
}
if ( !clientscripts\_zombiemode_weapons::is_weapon_included( "sniper_explosive_zm" ) )
{
return;
}
level._ZOMBIE_ACTOR_FLAG_SNIPER_EXPLOSIVE_DEATH = 13;
register_clientflag_callback( "actor", level._ZOMBIE_ACTOR_FLAG_SNIPER_EXPLOSIVE_DEATH, ::sniper_explosive_death_response );
level._effect["sniper_explosive_death_mist"] = loadfx( "maps/zombie/fx_zmb_coast_jackal_death" );
level thread player_init();
}
player_init()
{
waitforclient( 0 );
players = GetLocalPlayers();
for( i = 0; i < players.size; i++ )
{
player = players[i];
}
}
sniper_explosive_death_response( localClientNum, set, newEnt )
{
if ( localClientNum != 0 )
{
return;
}
if ( !set )
{
return;
}
tag_pos = self gettagorigin( "J_SpineLower" );
players = GetLocalPlayers();
for( i = 0; i < players.size; i++ )
{
self clientscripts\_zombiemode::deleteZombieEyes( i );
playfx( i, level._effect["sniper_explosive_death_mist"], tag_pos );
}
}