Developer knowledge network · moderated exchange

Zajednica UnreliableCode

Zajednica za istraživanje, obrnuti inženjering i programiranje programera

Knowledge indexŽivjeti
4Categories
919Threads
2.8KPostovi
Analysis

Weapon hash table & component upgrade offset scanning in GTA V

fivem_native_coder
Lua Scripter
MEMBER
Rep: 64
Datum pridruživanja: Jun 2019
Postovi: 20
Hvala: 48
prije 1 mjeseci · Jul 8, 2026 8:13 AM
#1

Finding weapon damage multipliers and ammo clips in memory:

  1. From CPed, read CWeaponManager at offset 0x10B8.
  2. From CWeaponManager, read CWeaponInfo for current weapon at offset 0x20.
  3. In CWeaponInfo:
    • fDamage (float at offset 0xB0)
    • fTimeBetweenShots (float at offset 0x134): Fire rate cooldown.
    • fReloadTimeMP (float at offset 0x138): Instant reload.
    • fRecoilShake (float at offset 0x2F4): Camera shake.
    • fSpread (float at offset 0x74): Bullet spread accuracy.

Setting fDamage = 1000.0f and fSpread = 0.0f gives instant 1-shot laser accuracy.

fivem_native_guru
CitizenFX Dev
MEMBER
Rep: 182
Datum pridruživanja: May 2021
Postovi: 8
Hvala: 69
prije 1 mjeseci · Jul 8, 2026 9:26 AM
#2

Also modify fTimeBetweenShots to 0.05f to turn semi-auto pistols into full-auto miniguns.

ptr_arithmetic
C++ Wizard
MEMBER
Rep: 162
Datum pridruživanja: May 2018
Postovi: 73
Hvala: 42
prije 1 mjeseci · Jul 8, 2026 4:32 PM
#3

Clean CWeaponInfo structure offsets.