Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin
12 posts, 7 people · 10,897 views Thread Rating: ★★★★★
closedNo-Nade
Started by MBosta on 06-21-2007, 11:50 AM
M MBosta
started this thread
Posts: 208
Threads: 30
Joined: Sep 2006
06-21-2007, 11:50 AM #1

Yes, before you pounce on me and tell me there already is one, I've tried them all. I posted in their threads saying they don't work when you just turn off nades, but no-one responded. Seeing how the summer is here, you nice coders have some extra time (<3) Just a simple no-nade plugin. Thanks.

N nacrotic
posted here
Posts: 16
Threads: 5
Joined: Aug 2006
06-21-2007, 05:40 PM #2
///////////////////////////////////////////////////////////////////////////////////////n//n//	AMX Mod (X)n//n//	Developed by:n//	The Amxmodx DoD Communityn//	Hell Phoenix (Hell_Phoenix@frenchys-pit.com)n//      N@CR0T!C (nacrotic@free.fr)n//	https://www.dodplugins.netn//n//	This program is free software; you can redistribute it and/or modify itn//	under the terms of the GNU General Public License as published by then//	Free Software Foundation; either version 2 of the License, or (atn//	your option) any later version.n//n//	This program is distributed in the hope that it will be useful, butn//	WITHOUT ANY WARRANTY; without even the implied warranty ofn//	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNUn//	General Public License for more details.n//n//	You should have received a copy of the GNU General Public Licensen//	along with this program; if not, write to the Free Software Foundation,n//	Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USAn//n//	In addition, as a special exception, the author gives permission ton//	link the code of this program with the Half-Life Game Engine ("HLn//	Engine") and Modified Game Libraries ("MODs") developed by Valve,n//	L.L.C ("Valve"). You must obey the GNU General Public License in alln//	respects for all of the code used other than the HL Engine and MODsn//	from Valve. If you modify this file, you may extend this exceptionn//	to your version of the file, but you are not obligated to do so. Ifn//	you do not wish to do so, delete this exception statement from yourn//	version.n//n//	Name:		DoD No Grenadesn//	Author:	Hell Phoenix modified by N@CR0T!Cn//n//	Description:	This plugin disabled grenadesn//n//	n//n//	n//n//  Commands:  n//  Cvars:     dod_grenades (0|1)  (Default is on 1)n//n//  v1.0    - Createdn//n//  ToDo    Nothingn//	   n//n///////////////////////////////////////////////////////////////////////////////////////nnn#include <amxmodx>n#include <dodfun>n#include <dodx>nn#define PLUGIN "DoD No Grenades"n#define VERSION "1.0"n#define AUTHOR "AMXX DoD Community modify by N@CR0T!C"nnew g_nadesnnpublic plugin_init(){n   register_plugin(PLUGIN, VERSION, AUTHOR)n   g_nades = register_cvar("dod_grenades","1")n   register_event("ResetHUD","give_grenades","be")n}nnpublic give_grenades(id){n	if(get_pcvar_num(g_nades)){n		set_task(0.1,"give_nades",id)n		return PLUGIN_CONTINUEn	}n	return PLUGIN_CONTINUEn}nnpublic give_nades(id){n	if(get_user_team(id) == AXIS){n		dod_set_user_ammo(id,DODW_STICKGRENADE,0)n		return PLUGIN_HANDLEDn	}n	else if(get_user_team(id) == ALLIES){n		if(dod_get_map_info(MI_ALLIES_TEAM) == 1){n			dod_set_user_ammo(id,DODW_MILLS_BOMB,0)n			return PLUGIN_HANDLEDn		}n		else if(dod_get_map_info(MI_ALLIES_TEAM) == 0){n			dod_set_user_ammo(id,DODW_HANDGRENADE,0)n			return PLUGIN_HANDLEDn		}n        }n        return PLUGIN_HANDLEDn}n
nnCompile and enjoy

M MBosta
started this thread
Posts: 208
Threads: 30
Joined: Sep 2006
06-21-2007, 06:09 PM #3

Thanks, but is there a CVAR to control it. Just on/off.

N nacrotic
posted here
Posts: 16
Threads: 5
Joined: Aug 2006
06-21-2007, 06:43 PM #4

yes on/off of plugin if the plugin is on no nade on server ...nif you want y can add a cvar for nade quantity

M MBosta
started this thread
Posts: 208
Threads: 30
Joined: Sep 2006
06-21-2007, 07:26 PM #5

Ah ok, so is it like amx_nonade "1" "0" (On/Off) ?

| |OnEHiTwOnDeR|SoCal
posted here
Posts: 320
Threads: 37
Joined: Mar 2007
06-21-2007, 07:43 PM #6

g_nades = register_cvar("dod_grenades","1")

M MBosta
started this thread
Posts: 208
Threads: 30
Joined: Sep 2006
06-21-2007, 11:02 PM #7

Thanks One Hit, and Narcotic. Works like a charm.

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
06-21-2007, 11:25 PM #8

dod_grenades 0 would turn off the PLUGIN and allow nades.. while setting it to 1 turns the plugin on and disables nades

E exodia
posted here
Posts: 2
Threads: 0
Joined: Mar 2007
07-11-2007, 11:03 AM #9

Hello, rnrnI noted by using this plugin that on the maps as Flash the British had the possibility of using their grenades contrary to German which are stripped by it. But the maps like Avalanche no problem on the two sides there aren't grenades. Is it possible to regulate this problem? Thank you :)

Wilson [29th ID]
posted here
Posts: 623
Threads: 57
Joined: Oct 2005
07-13-2007, 11:14 AM #10

dod custom supply works bettaaaaaaaaaaaa

E exodia
posted here
Posts: 2
Threads: 0
Joined: Mar 2007
07-19-2007, 11:37 AM #11

Hello rnrnIt would seem that I found the problem!! thus here the new source code, for those which wishes to install this plugin on their serverrnrn

///////////////////////////////////////////////////////////////////////////////////////rn//rn//	AMX Mod (X)rn//rn//	Developed by:rn//	The Amxmodx DoD Communityrn//	Hell Phoenix (Hell_Phoenix@frenchys-pit.com)rn//      N@CR0T!C (nacrotic@free.fr)rn//	https://www.dodplugins.netrn//rn//	This program is free software; you can redistribute it and/or modify itrn//	under the terms of the GNU General Public License as published by thern//	Free Software Foundation; either version 2 of the License, or (atrn//	your option) any later version.rn//rn//	This program is distributed in the hope that it will be useful, butrn//	WITHOUT ANY WARRANTY; without even the implied warranty ofrn//	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNUrn//	General Public License for more details.rn//rn//	You should have received a copy of the GNU General Public Licensern//	along with this program; if not, write to the Free Software Foundation,rn//	Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USArn//rn//	In addition, as a special exception, the author gives permission torn//	link the code of this program with the Half-Life Game Engine ("HLrn//	Engine") and Modified Game Libraries ("MODs") developed by Valve,rn//	L.L.C ("Valve"). You must obey the GNU General Public License in allrn//	respects for all of the code used other than the HL Engine and MODsrn//	from Valve. If you modify this file, you may extend this exceptionrn//	to your version of the file, but you are not obligated to do so. Ifrn//	you do not wish to do so, delete this exception statement from yourrn//	version.rn//rn//	Name:		DoD No Grenadesrn//	Author:	Hell Phoenix modified by N@CR0T!Crn//rn//	Description:	This plugin disabled grenadesrn//rn//	rn//rn//	rn//rn//  Commands:  rn//  Cvars:     dod_grenades (0|1)  (Default is on 1)rn//rn//  v1.0    - Createdrn//rn//  ToDo    Nothingrn//	   rn//rn///////////////////////////////////////////////////////////////////////////////////////rnrnrn#include <amxmodx>rn#include <dodfun>rn#include <dodx>rnrn#define PLUGIN "DoD No Grenades"rn#define VERSION "1.0"rn#define AUTHOR "AMXX DoD Community modify by N@CR0T!C"rnnew g_nadesrnrnpublic plugin_init(){rn   register_plugin(PLUGIN, VERSION, AUTHOR)rn   g_nades = register_cvar("dod_grenades","1")rn   register_event("ResetHUD","give_grenades","be")rn}rnrnpublic give_grenades(id){rn	if(get_pcvar_num(g_nades)){rn		set_task(0.1,"give_nades",id)rn		return PLUGIN_CONTINUErn	}rn	return PLUGIN_CONTINUErn}rnrnpublic give_nades(id){rn	if(get_user_team(id) == AXIS){rn		dod_set_user_ammo(id,DODW_STICKGRENADE,0)rn		return PLUGIN_HANDLEDrn	}rn	else if (get_user_team(id) == ALLIES){rn		dod_set_user_ammo(id,DODW_HANDGRENADE,0)rn		dod_set_user_ammo(id,DODW_MILLS_BOMB,0)rn		return PLUGIN_HANDLEDrn	}rn        return PLUGIN_HANDLEDrn}
R rebeccs
posted here
Posts: 22
Threads: 5
Joined: Jun 2010
04-30-2015, 02:07 AM #12

Well, now there are some problems, there is a map inside the grenade, but no people even though they can pick up the grenade on the map, and like throwing the enemy.......

DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC