Thread: Too many checks
View Single Post
FoxMulder
Senior Member
Join Date: Jan 2009
Location: Orlando, FL
Old 04-14-2011 , 16:55   Re: Too many checks
Reply With Quote #7

Quote:
Originally Posted by AtomicStryker View Post
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(clientProp_Send"m_hActiveWeapon");
if(
GetPlayerWeaponSlot(client0) == iWeapon)
{
   
//looks like player is most likely holding a melee weapon

__________________
FoxMulder is offline