Developer knowledge network · moderated exchange

UnreliableCode қауымдастығы

Әзірлеушілерді зерттеу, кері инженерия және кодтау қауымдастығы

Knowledge indexТірі
4Categories
919Threads
2.8KЖазбалар
Analysis

Weapon hash table & component upgrade offset scanning in GTA V

fivem_native_coder
Lua Scripter
MEMBER
Өкіл: 64
Қосылу күні: Jun 2019
Хабарламалар: 20
Рахмет: 48
1 ай бұрын · 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
Өкіл: 182
Қосылу күні: May 2021
Хабарламалар: 8
Рахмет: 69
1 ай бұрын · 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
Өкіл: 162
Қосылу күні: May 2018
Хабарламалар: 73
Рахмет: 42
1 ай бұрын · Jul 8, 2026 4:32 PM
#3

Clean CWeaponInfo structure offsets.