Raised This Month: $ Target: $400
 0% 

grenade miss check


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode