Page 1 of 1
AmmoGain with multiple weapons
Posted: 08 Jun 2013, 17:11
by Kyb
Hi,
I would like to know how to have an ammo gain for weapons that aren't in player's hand ? (like Combo or SDpro) I looked at the Combo script, but I haven't found the function that allowed to do that.
Any idea ?
Re: AmmoGain with multiple weapons
Posted: 08 Jun 2013, 19:05
by steeffeen
you can't set different AmmoGain's for each weapon
if you really want to modify the current ammo of a specific weapon you could use
Code: Select all
Void SetPlayerAmmo (CSmPlayer Player, EWeapon Weapon, Integer Count);
Void AddPlayerAmmo (CSmPlayer Player, EWeapon Weapon, Real DeltaCount);
(didn't test it though)
Re: AmmoGain with multiple weapons
Posted: 08 Jun 2013, 20:15
by Kyb
Ok, thanks.
I will try to make a function based on the last switch Time and the AmmoGain I want for the weapon to add an amount of ammo when the player will switch weapon. But i need to know the AmmoGain Multiplier for each Weapon (or the time to reload 1 ammo with AmmoGain = 1).
Someone know when I can find these values ?
Re: AmmoGain with multiple weapons
Posted: 08 Jun 2013, 20:19
by steeffeen
easiest way to get these values is calculating the time between 2 shots
(spam out all your ammunition and keep holding "shoot", then measure the delay between the shots)