Developer knowledge network · moderated exchange

Сообщество UnreliableCode

Сообщество разработчиков, обратного проектирования и кодирования

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.