View Issue Details

IDProjectCategoryView StatusLast Update
0006239Multi Theft Auto : San AndreasScriptingpublic2014-05-15 16:55
ReporterSimbadDeZeemanAssigned ToJusonex 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.0.5 
Target Version1.3.2Fixed in Version1.3.2 
Summary0006239: getPedTotalAmmo does not return the correct values
Description

getPedTotalAmmo returns old values when the player is in a vehicle.

After shooting in driveby mode it still returns the ammo that you had before you entered the vehicle.

TagsNo tags attached.

Users sponsoring this issue
Sponsors List Total Sponsorship = EUR 5

2013-03-02 01:01: dennisuni (EUR 5)
Users sponsoring this issue (Total Sponsorship = EUR 5)

Relationships

has duplicate 0007530 closed New issues getPedTotalAmmo returns invalid values 

Activities

SimbadDeZeeman

2011-12-05 20:14

reporter   ~~0015334

Also some slots like 7,8, and 9 are very glitchy. Sometimes it returns 1 ammo left, while you have none. Sometimes it shows correct data. Very unreliable.

I would suggest you guys to fix this in the nearest mta update.

ccw

2013-03-01 11:09

administrator   ~~0018201

Last edited: 2013-03-02 01:06

Yeah, come on guys. Fix this ffs

btw, here is a resource which shows the desync
http://nightly.mtasa.com/files/res/show_ammo.zip

Jusonex

2013-03-03 19:25

administrator   ~~0018218

Fixed in http://code.google.com/p/mtasa-blue/source/detail?r=5141
(I'm not allowed to mark this issue as resolved due to the sponsorship)

arranTuna

2013-03-03 20:56

manager   ~~0018221

"I'm not allowed to mark this issue as resolved due to the sponsorship"

Why not?

You just have to hope they stick to their word and actually donate the sponsored amount to MTA.

dennisuni

2013-03-03 23:04

viewer   ~~0018223

Donation sent, you may resolve the issue now.

ixjf

2014-04-18 22:21

viewer   ~~0020718

Last edited: 2014-04-18 22:23

View 2 revisions

"Also some slots like 7,8, and 9 are very glitchy. Sometimes it returns 1 ammo left, while you have none. Sometimes it shows correct data. Very unreliable."

It seems that this issue was not fixed. getPedTotalAmmo sometimes returns 1, sometimes 0 - it's completely random. I tested this with a minigun, which is weapon slot 7.

You can reproduce this issue by giving yourself a minigun and shooting until you run out of ammo - if you're unlucky, getPedTotalAmmo or getPedAmmoInClip should return 1 for weapon slot 7. This only happens on the server side.

Jusonex

2014-04-18 22:57

administrator   ~~0020719

I dunno why (yet), but the fix fixes only weapon slot 8 (which is WEAPONSLOT_TYPE_THROWN)

Jusonex

2014-05-14 15:04

administrator   ~~0020883

Please retest with the latest nightly: http://nightly.mtasa.com/?mtasa-1.4-latest

arranTuna

2014-05-14 16:03

manager   ~~0020884

Last edited: 2014-05-15 16:55

View 4 revisions

It's still buggy with minigun (slot 7) and fire extinguisher (slot 9)

I used all my minigun ammo but getPedTotalAmmo(ped, 7) returns 2

I used all my fire extinguisher but getPedTotalAmmo(ped, 9) returns 3

Oh wait, facepalm that link gave me v1.4-unstable-6407 which is older than your commit, will retest with manual download of newest nightly.

Oh, 6407 is the newest nightly available, looks like we need a new nightly build!

Edit: Tested with newest nightly and is fixed.

Issue History

Date Modified Username Field Change