Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin
Archive › Old Forum Threads › Help › Scripting Help › Is it possible to increase...
7 posts, 4 people · 981 views Thread Rating: ★★★★★
closedIs it possible to increase...
Started by =|[76AD]|= TatsuSaisei on 08-08-2006, 04:19 PM
=|[76AD]|= TatsuSaisei
started this thread
Posts: 794
Threads: 54
Joined: May 2005
08-08-2006, 04:19 PM #1

is it possible to increase the number of nades a player may hold max.n nI am finishing up a plugin that gives more nades to the "grenadier" classes in the game, but Axis max out at 5 while the Allies max out at 3.... I do not mind the 5 grenade max for Axis, but I would like the Allies to have the same opportunity to hold as many...n nso can this "limit" be worked around in a code ?

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
08-08-2006, 10:19 PM #2

well how are you doing it?nthru give_item weapon_handgrenade etc etc..?nncuase im pretty sure if you did it like:n

dod_set_user_ammo(id,DODW_HANDGRENADE,5)
nthat it would work...

H Hell Phoenix
posted here
Posts: 201
Threads: 17
Joined: Jan 2005
08-08-2006, 11:33 PM #3

The limit is 999 (or 99? cant remember off hand). Basically thats what I set it to in the unlimited nade plugin. However the hud only shows 2 until you throw the 2 you spawn with, then the correct amount show.

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
08-08-2006, 11:59 PM #4

i think the limits 999.. but you only need to throw one grenade, not all defualt nades, to refresh the count number

Wilson [29th ID]
posted here
Posts: 623
Threads: 57
Joined: Oct 2005
08-09-2006, 01:17 AM #5

You have to set the backpack ammo with ammox to make it show more than 2. I'm not sure what kind of ammo grenades take (what number they are) but you'd use the following code:rnrn

public set_ammo(id, weapon, channel, ammo)rn{rn	dod_set_user_ammo(id, weapon, ammo)rn	// Update user's HUDrn	message_begin(MSG_ONE,get_user_msgid("AmmoX"),{0,0,0},id);rn	write_byte(channel);rn	write_byte(ammo);rn	message_end();rn}
rnrnWhere channel is a number. For example, garand 30cal ammo is 3, Rockets are 13, Carbine ammo is 2, mp40 is 1. I just don't know the number for grenades and my msglogger isn't working.

H Hell Phoenix
posted here
Posts: 201
Threads: 17
Joined: Jan 2005
08-09-2006, 10:54 AM #6

Thats sweet! Good stuff!

=|[76AD]|= TatsuSaisei
started this thread
Posts: 794
Threads: 54
Joined: May 2005
08-09-2006, 12:59 PM #7

you all rock... is all I have to say...

Archive › Old Forum Threads › Help › Scripting Help › Is it possible to increase...
DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC