Detecting the player's active weapon class
π― ACEβ’Updated 2 days agoβ’0 views
Use weapon:getClass() (e.g. "weapon_fists" for fists) instead of the print name. Guard the access with isValid(owner:getActiveWeapon()) before reading the classβ¦
How to check the client's active weapon in SF without errors on death
Use weapon:getClass() (e.g. "weapon_fists" for fists) instead of the print name. Guard the access with isValid(owner:getActiveWeapon()) before reading the class - the active weapon entity is nil when the owner dies, which caused 'Entity is not valid' tick errors.