[CCI Script]Set Beam Detachable & Trackable

YEA
✔️ HL Verified
Joined
Oct 31, 2014
Messages
200
Best answers
0
someone asked me for this


PHP:
/* MOD.Weapon.core */

stock MOD_Weapon_PreCache () {}

public @WeaponBeam ( Client, Weapon, const Class[], Size )
{
	register_message( get_user_msgid("KillTrail"), "@KillTrail" );// We had better register in 'PluginInit' tho

	set_task( 0.5, "@BeamDetach", Weapon );// Set detachment time
}

public @BeamDetach( Weapon )
{
	set_pdata_int( pev( Weapon, pev_owner ), 202, false );// bool: AttackShooting

	/* Detach the Beam */
	message_begin( MSG_ALL, get_user_msgid( "DetachTrail" ) );
	write_long( Weapon );
	message_end( );

	setWeaponHOMING( Weapon, 550.0, 1, 1 | 2);// Set weapon speed and trackable
}

public @KillTrail( MsgID, dest )
{
	new Weapon = get_msg_arg_int( 1 );
	remove_task( Weapon );
}
 
Lost in space
Banned
Joined
Dec 29, 2014
Messages
253
Best answers
0
Is this not a bit like cheating if the attack tracks the player lol xD
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top