Quote:
Originally Posted by Mnkras
which do you suggest? i am going to have it so that there is an effect on the player if they have that weapon out
|
Looking up the m_hActiveWeapon will tell you the entity index of the weapon. From there, you can get the classname with GetEdictClassname (after checking IsValidEdict ofc) and easily get/set properties of the weapon.
If you only need the classname and nothing else (ex. "tf_weapon_flamethrower"), then the GetClientWeapon function is simpler to use and would be a better fit.