Developer knowledge network ยท moderated exchange

Komunitas Kode Tidak Dapat Diandalkan

Riset Pengembang, Rekayasa Terbalik & Komunitas Pengkodean

Knowledge indexHidup
4Categories
919Threads
2.8KPostingan
Analysis

Weapon hash table & component upgrade offset scanning in GTA V

fivem_native_coder
Lua Scripter
MEMBER
Reputasi: 64
Tanggal Bergabung: Jun 2019
Postingan: 20
Terima kasih: 48
1 bulan yang lalu ยท 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
Reputasi: 182
Tanggal Bergabung: May 2021
Postingan: 8
Terima kasih: 69
1 bulan yang lalu ยท 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
Reputasi: 162
Tanggal Bergabung: May 2018
Postingan: 73
Terima kasih: 42
1 bulan yang lalu ยท Jul 8, 2026 4:32 PM
#3

Clean CWeaponInfo structure offsets.