notify when grenade goes off
is it posible to get notified when an he grenade goes off in cs?
... besides using set_task on "fire in the hole" |
yep
Code:
Code:
Event "23" is called on every SVC_TEMPENTITY, and the arguments are the write_byte/string/etc commands associated with tempentities. The scale of the grenade TE_EXPLOSION just happens to be 25, and there may be other TE_EXPLOSION events in cs (which i havent found yet) or possibly even custom maps that might possibly throw this off, but it would be very rare. I use this code in my breakable doors plugin. Hope this helps :) |
ah, thank you much
|
As a followon to this question, is there a way to tell the exact xyz postion of where a grenade detonates?
thanks! |
Well, get HL SDK and it tells you this about the mentioned temp entity:
Code:
#define TE_EXPLOSION 3 // additive sprite, 2 dynamic lights, flickering particles, explosion sound, move vertically 8 pps |
Perfect thats the info i needed thanks. HLSDK is the devil to read i deleted it =p
|
Bah, HL's SDK is like a maze
|
as long as you open it up in a good compiler you can jump to function/class definitions really easily, which is where everything begins :)
|
| All times are GMT -4. The time now is 14:42. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.