Raised This Month: $ Target: $400
 0% 

Disable grenades


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bahr
Member
Join Date: Aug 2005
Old 08-28-2005 , 10:02   Disable grenades
Reply With Quote #1

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

Thnx.
bahr is offline
Send a message via MSN to bahr
bahr
Member
Join Date: Aug 2005
Old 08-28-2005 , 20:10  
Reply With Quote #2

Nobody can answer this pls?
bahr is offline
Send a message via MSN to bahr
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 08-28-2005 , 20:35  
Reply With Quote #3

you cant do it like that, you proberbly need to remove the weapon from the player somehow. Or disable their usage
__________________
Github archive for plugins, the repos for the other c++ projects are there to.
EKS is offline
bahr
Member
Join Date: Aug 2005
Old 08-28-2005 , 21:41  
Reply With Quote #4

Quote:
Or disable their usage
Yeah, but how??
bahr is offline
Send a message via MSN to bahr
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 08-28-2005 , 21:45  
Reply With Quote #5

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.
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 08-29-2005 , 14:25  
Reply With Quote #6

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
__________________
Github archive for plugins, the repos for the other c++ projects are there to.
EKS is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 08-29-2005 , 14:39  
Reply With Quote #7

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 }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
bahr
Member
Join Date: Aug 2005
Old 09-01-2005 , 09:36  
Reply With Quote #8

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

Anyone can help please??
bahr is offline
Send a message via MSN to bahr
bahr
Member
Join Date: Aug 2005
Old 09-03-2005 , 08:48  
Reply With Quote #9

Bump
bahr is offline
Send a message via MSN to bahr
Reply



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 14:27.


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