Quote:
Originally Posted by AtomicStryker
Besides, there has to be a smarter way to determine if a weapon is a melee weapon. I'd say check the ammo, or something else in the netprops.
|
I thought of this but then The Sandman came into mind
I think checking to see if the active weapon is in the 0 slot would suffice.
PHP Code:
new iWeapon = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");
if(GetPlayerWeaponSlot(client, 0) == iWeapon)
{
//looks like player is most likely holding a melee weapon
}
__________________