Object caps could still use a little optimize.
PHP Code:
public Ham_ObjectCaps_Pre( index )
{
if( !is_user_alive( index ) ) return;
if(( pev( index, pev_button ) & IN_USE )
&& !( pev( index, pev_flags ) & FL_ONGROUND )
&& !( pev( index, pev_movetype ) == MOVETYPE_FLY ) )
{
if(g_iPara_Ent[ index ] <= 0)
{
g_iPara_Ent[ index ] = CreateParachute( index );
}
else
{
ExecuteParachute( index );
}
return;
}
RemoveParachute( index, g_iPara_Ent[ index ] );
}
The rest seems right in my eyes,
Ham_Killed maybe could be removed, because parachute cant be used when dead, and spawn resets it anyway.
__________________