View Issue Details

IDProjectCategoryView StatusLast Update
0007719Multi Theft Auto : San AndreasServerpublic2018-09-02 17:12
ReporterlopezlooAssigned Tomyonlake 
Status closedResolutionunable to reproduce 
PlatformOSOS Version1.3.3 r5624
Product Version 
Target VersionFixed in Version 
Summary0007719: getPedTotalAmmo() & getPedAmmoInClip() gets crazy after setWeaponAmmo()

getPedTotalAmmo() and getPedAmmoInClip() has returning different values on server (incorrect) and client (correct).

See my code. setWeaponAmmo() is needed for me because I use that for custom clip size in weapons.

Steps To Reproduce

Additional Information

TagsNo tags attached.



2013-07-24 17:01

manager   ~~0018975

Last edited: 2013-07-24 17:02

View 2 revisions

I've seen this problem at lot myself.

Like in the anti cheat I made for detecting ammo cheaters, in the logs for it we get about 150 lines a day saying players have like 50-60k ammo when they should have very little or even 0, like so:

slot: 3 actual: 34563 should: 0
slot: 2 actual: 34087 should: 0
slot: 8 actual: 62648 should: 0
slot: 8 actual: 62648 should: 0
slot: 3 actual: 156 should: 104
slot: 4 actual: 5540 should: 999
slot: 2 actual: 3075 should: 1368

Some of these might even be cheaters but at least 90% aren't.

Are you sure it's only after setWeaponAmmo? I don't think we use setWeaponAmmo but we definitely use giveWeapon to add on more ammo, which is probably the same routines.


2013-07-25 22:23

developer   ~~0018988

Last edited: 2013-07-25 22:29

View 3 revisions

Hm.. It was bugged too without setWeaponAmmo. In both cases first weapon must be always grenade.

Lol, run this code:
getPedWeapon() is also bugged and return 0.


2018-07-05 13:50

reporter   ~~0026618

Couldn't reproduce.
Both clientside and serverside output the same for me.
Seems to be fixed.


2018-07-21 18:25

updater   ~~0026765

Unable to reproduce in Multi Theft Auto v1.5.5-release-12430.
Also couldn't find the commit that fixed this, someone should add it if they can find it at any point.

Issue History

Date Modified Username Field Change