View Single Post
little_froy
Senior Member
Join Date: May 2021
Old 03-31-2024 , 09:13   Re: [L4D2] Unlimited Chainsaw
Reply With Quote #8

Quote:
Originally Posted by BloodyBlade View Post
If StrEqual(classname, "weapon_chainsaw") returns that the firing weapon is a chainsaw, then GetPlayerWeaponSlot(client, 1) returns a valid value. I have never received an error message with this code.
weapon in which slot can be modified by addons, for example it can be in slot 0. and, other plugin can call api such as "SDKHooks_DropWeapon" to change current active weapon if the event hook earlier than you plugins.
extreme situations should be considered.

Last edited by little_froy; 03-31-2024 at 09:20.
little_froy is offline