AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Disable grenades (https://forums.alliedmods.net/showthread.php?t=17258)

bahr 08-28-2005 10:02

Disable grenades
 
Hi,

I would like to disable nail grenades (TFC) for certain maps.
How can I achieve that?

I've tried with

Code:

register_event("SecAmmoVal","myFunc","a")
but to no avail :cry:

Thnx. :)

bahr 08-28-2005 20:10

Nobody can answer this pls?

EKS 08-28-2005 20:35

you cant do it like that, you proberbly need to remove the weapon from the player somehow. Or disable their usage

bahr 08-28-2005 21:41

Quote:

Or disable their usage
Yeah, but how??

Kensai 08-28-2005 21:45

Not sure, but maybe look at a plugin that restricts weapons, and try to make it so it auto restricts all nades? I'll try to look into this.

EKS 08-29-2005 14:25

Quote:

Originally Posted by bahr
Quote:

Or disable their usage
Yeah, but how??

You can do it multiple ways, 1 way would be to disallow users to select the weapon hooking a CurWeapon style message.

Or remove it from the world when its used

Hawk552 08-29-2005 14:39

Code:
#include <amxmodx> #include <tfcx> #include <amxmisc> public plugin_init() {     register_plugin("No Nail Grenades","1.0","Hawk552")     register_event("ResetHUD","removenade","be") } public removenade(id) {     if(is_user_alive(id)==1)     {         if(tfc_getweaponbammo(id,TFC_WPN_NAILGRENADE)>0)         {             tfc_setweaponbammo(id,TFC_WPN_NAILGRENADE,0)         }     }     return PLUGIN_HANDLED }

bahr 09-01-2005 09:36

Sorry for the delayed answer, but...nope that doesnt work!

Anyone can help please??

bahr 09-03-2005 08:48

Bump


All times are GMT -4. The time now is 14:27.

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