View Single Post
deprale
Senior Member
Join Date: Oct 2018
Location: Leeds
Old 04-03-2023 , 08:18   Re: grenade miss check
Reply With Quote #5

Depends, if you want it the easy way purpose damage detector you'd hook ham takedamage and check damagebits type DMG_GRENADE. Simple.

You could also hook when the grenade explodes, and use find_ent_in_sphere or whatever the function was called, creating a sphere of dimensions - DMG_GRENADE radius const value, but this way its worse because if you have a plugin modifying it's range then it won't detect it.

Also please check if the damage inflicted was less than 1, so you don't accidentally register 0.5 dmg (which causes players to emit hurt sounds but they stay undamaged)
__________________

Last edited by deprale; 04-03-2023 at 08:19.
deprale is offline