Grenade Think
I've recently begun coding for AMXX just to see what things I can do. I'm working right now on a plugin which prevents grenades from being used on maps like fy_iceworld. Here is the code so far (thanks to FrostNades):
Code:
However, I'm not entirely clear on how this stops the grenades from exploding. And I would like to know a way to make the thrown grenades (now lying forlornly on the ground) to explode on command, taking into account that they can be either flashes, smokes, or HEs. |
Re: Grenade Think
im guessing that amxx thinks of the grenade first then blocks it from the hl engine so it doesnt explode, i think you can make a command to switch HANDLED to CONTINUE for 1 second and that might make all nades explode
|
Re: Grenade Think
Yes, exactly what kp_uparrow said. In other words, (to rephrase him) when you return PLUGIN_HANDLED, the event you hooked gets blocked from further actions by AMXX. That's why your grenade doesn't explode, because the event never got to the "explode" part.
Throw grenade ===> return PLUGIN_HANDLED =X(block)X=> Explode else Throw grenade ===> return PLUGIN_CONTINUE ===> Explode |
| All times are GMT -4. The time now is 01:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.