Thread
:
grenade miss check
View Single Post
deprale
Senior Member
Join Date: Oct 2018
Location: Leeds
04-03-2023 , 08:18 Re: grenade miss check
#
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)
__________________
Fav song for now
Last edited by deprale; 04-03-2023 at
08:19
.
deprale
View Public Profile
Send a private message to deprale
Find More Posts by deprale