09-02-2012, 21:04
(09-02-2012, 20:31)Cyborgking Wrote:(09-02-2012, 20:25)wise Wrote: probably late to the game but I'm tweaking Cyborg's AI mod and added several new purchaseable weapons/perks. Only problem is, I can't seem to set the max ammo of the weapons.It'll always give as much ammo as the max ammo. If you want to increase the max ammo you'd want to create a custom version of the commando.
I'm using the following snippet:
Code:else if( response == "buy_commando")
{
if (self.money >= 250)
{
self playSoundToPlayer("zmb_cha_ching", self);
self closeMenu( game[ "modmenu1" ] );
self giveWeapon("commando_dualclip_mp");
self.money -= 250;
self setWeaponAmmoStock("commando_dualclip_mp",720);
self.hud_score_value setValue(self.money);
self thread maps\mp\gametypes\aico::ScoreHUD( -250 );
self playSoundToPlayer("zmb_cha_ching", self);
self iPrintln("Commando purchased");
}
else
self playSoundToPlayer("zmb_no_cha_ching", self);
}
it'll give me the weapon and take 250 "points" from the player, but never gives them more than the 240/120 ammo.
any ideas?
So the way you do it for unlimited ammo is created a custom weapon for each?
that doesn't seem very efficient or am I missing something with that whole process?