Raised This Month: $ Target: $400
 0% 

Grenade Think


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Nomexous
Member
Join Date: Oct 2007
Old 10-22-2007 , 14:54   Grenade Think
Reply With Quote #1

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:
#include <amxmodx> #include <fakemeta> #include <engine> #define PLUGIN "Nade Disabler" #define VERSION "0.1" #define AUTHOR "Nomexous" new nade_pcvar public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         nade_pcvar = register_cvar("amx_disable_grenades", "0")         register_think("grenade", "grenade_think") } public grenade_think(ent) {     if (get_pcvar_num(nade_pcvar)) return PLUGIN_HANDLED }
This works very well. It's exactly what I want. You can buy grenades and throw them, but they will simply bounce to a halt and not explode.

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.

Last edited by Nomexous; 10-22-2007 at 22:36.
Nomexous 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 01:15.


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