View Issue Details

IDProjectCategoryView StatusLast Update
0007970Multi Theft Auto : San AndreasClientpublic2014-11-19 00:02
ReporterDragon Assigned ToCazomino05  
Status resolvedResolutionfixed 
PlatformQ9450 | GTX 280 | 8 GB DDR3 RAMOSWindows 7 Professional 64BitOS VersionV6.1 B:7601 SP1
Product Version1.3.4 
Target Version1.4.1Fixed in Version1.4.1 
Summary0007970: Peds with weapons malfunction due to weird totalAmmo and ammoInClip values

When setting a peds (server side, synced = true) current weapon serverside, the clients will be updated correctly, however when getting the slot serverside it will remain as 0. Clients on the other hand have the problem, that whenever a ped with a weapon is streamed in the total ammo and ammo in clip will both be 1. When the server updates the ammo of a ped while the client has it streamed in it will update, however there are still weird results that can occur:

  1. Peds shoot, have visible muzzle sparks but don't actually shoot bullets that hurt
  2. Peds shoot, have no muzzle sparks and don't shoot bullets that hurt
  3. Peds shots work at first, but after a couple shots case 1 or 2 occurs.
Additional Information

I attached a small resource I used for some testing. Press b to spawn a ped, you can then use your "aim_weapon" and "fire" key to have the peds aim their weapons and fire at you. The onClientStreamIn event lets you know the peds ammo in clip and their total ammo, the server will also give you the information it has about the ped.

The resource also shows that its impossible for a ped to rotate their camera around while aiming their weapon and sometimes peds can fire in a direction 180° from the direction they are facing.

TagsNo tags attached.

  Users sponsoring this issue
Sponsors List Total Sponsorship = EUR 20

2014-09-26 12:26: arranTuna (EUR 20)
  Users sponsoring this issue (Total Sponsorship = EUR 20)



2014-09-09 16:30

manager   ~~0021985

Last edited: 2014-09-21 22:43

Confirmed, this bug where their ammo value is set to 1 when streamed in makes it impossible to have a game mode with peds that shoot guns as the peds won't be shooting at you.

Edit: Just thought I'd add that there is a quick 'hacky' fix for this. If there ammo is set to 1 on stream in, how about change the 1 to 9999? At least then we've got peds that can actually shoot bullets.

Edit: I've updated the test resource so it's much simpler now, to reproduce just follow these steps:

-- Start it
-- Do: /debugspawn
-- Get an M4, aim and shoot, see that the ped shoots as well, observe the ammo go down on screen (DX at bottom middle)
-- Do: /moveme
-- Notice that when you come back, their ammo is 1, aim and shoot, notice the ped will only fire 1 bullet


2014-11-19 00:02

manager   ~~0022523

Fixed in

Issue History

Date Modified Username Field Change