View Full Version : Is it possible to increase...
=|[76AD]|= TatsuSaisei
08-08-2006, 05:19 PM
is it possible to increase the number of nades a player may hold max.
I 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...
so can this "limit" be worked around in a code ?
diamond-optic
08-08-2006, 11:19 PM
well how are you doing it?
thru give_item weapon_handgrenade etc etc..?
cuase im pretty sure if you did it like:
dod_set_user_ammo(id,DODW_HANDGRENADE,5)
that it would work...
Hell Phoenix
08-09-2006, 12:33 AM
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
08-09-2006, 12:59 AM
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]
08-09-2006, 02:17 AM
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:
public set_ammo(id, weapon, channel, ammo)
{
dod_set_user_ammo(id, weapon, ammo)
// Update user's HUD
message_begin(MSG_ONE,get_user_msgid("AmmoX"),{0,0,0},id);
write_byte(channel);
write_byte(ammo);
message_end();
}
Where 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.
Hell Phoenix
08-09-2006, 11:54 AM
Thats sweet! Good stuff!
=|[76AD]|= TatsuSaisei
08-09-2006, 01:59 PM
you all rock... is all I have to say...
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.