-
-
Notifications
You must be signed in to change notification settings - Fork 485
Closed
Description
Describe the bug
Give yourself 100 flamethrower
Use getPedTotalAmmo on slot 7
Returns 1000.
Caused false positive in my ammo cheat detection script and also if a server saves peoples ammo on quit they can keep quitting and their flame-thrower ammo multiples by ten.
To Reproduce
srun giveWeapon(getRandomPlayer(), 37, 100)
srun getPedTotalAmmo(getRandomPlayer(), 7)
Expected behavior
Not to be multiplied by 10.
Additional context
MTA10\mods\shared_logic\CClientPed.cpp line 1902 (GiveWeapon):
// Multiply ammo with 10 if flamethrower to get the numbers correct.
if ( weaponType == WEAPONTYPE_FLAMETHROWER ) uiAmmo *= 10;
Maybe just add the same kind of check in getPedTotalAmmo but divide by 10?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working