14.03.2015, 12:31
This problem has been asked 1-2 weeks ago in the French part.
Actually, GetPlayerWeaponData loops through player "weapon" stats slot per slot.
Then, it puts in "weapon" (passed by reference) the weaponid in the stats and in "ammo" (passed by reference) the ammo in the stats.
When you use "SetPlayerAmmo", it just sets the ammo in the player stats to the value you specified. It doesn't do anything about the weapon itself. And it works the same way when a player runs out of ammo.
Moreover, the game engine works such way as if you don't have ammo in a weapon, your character can't arm it (said just above).
But as ****** said, the "real" problem you pointed out is with "ResetPlayerWeapons".
EDIT : All I said is true if GetPlayerWeaponData and SetPlayerAmmo (and more mainly the weapon data management) hasn't changed since 0.3d
Actually, GetPlayerWeaponData loops through player "weapon" stats slot per slot.
Then, it puts in "weapon" (passed by reference) the weaponid in the stats and in "ammo" (passed by reference) the ammo in the stats.
When you use "SetPlayerAmmo", it just sets the ammo in the player stats to the value you specified. It doesn't do anything about the weapon itself. And it works the same way when a player runs out of ammo.
Moreover, the game engine works such way as if you don't have ammo in a weapon, your character can't arm it (said just above).
But as ****** said, the "real" problem you pointed out is with "ResetPlayerWeapons".
EDIT : All I said is true if GetPlayerWeaponData and SetPlayerAmmo (and more mainly the weapon data management) hasn't changed since 0.3d