Quote:
Originally Posted by RedShirt (JernejL)
Quote:
Originally Posted by Damian
Quote:
Originally Posted by Seif_
GetPlayerAmmo is still bugged. For some reason, it returns -1 at random times, preventing me from properly saving the player's ammo. I'll have to go with GetPlayerWeaponData though I'm not sure if it's as bad as GetPlayerAmmo to get the ammo.
|
When people scroll it reads ammo from the current weapon slot a person is on. My guess is they scrolled to fists, thus -1.
|
Only rely on the selected weapon's ammo, and only rely on it after the player holds the weapon for a few seconds - the ammo is not updated as often as you may want it to, and it can return old weapon ammo at first (example: player had a flamethrower with 5000 ammo and picked up a RPG, the script will still return 5000 ammo for RPG slot for a short time until the new value is synced in).
|
Well if someone request GetPlayerAmmo BEFORE ammo sync, it can be internally integrate like SyncAmmo or whatever is name...