Parity

Cannon

VEHICLE_WEAPON_TITAN2_40MM

Cannon is a weapon in GTA V. In FiveM scripts it is VEHICLE_WEAPON_TITAN2_40MM, hash 3051358707.

Display name
Cannon
Damage per hit
30
Magazine
5
Fire rate
120 shots/min (0.5 s between shots)
Range
500 m
Damage type
Explosive
Hash
3051358707
Signed hash
-1243608589
Hex
0xB5E009F3

Give it in a FiveM script

FiveM's Lua turns a name in backticks into its hash when the script loads, so `vehicle_weapon_titan2_40mm` and 3051358707 are the same value.

lua
-- give the Cannon with 250 rounds
GiveWeaponToPed(PlayerPedId(), `vehicle_weapon_titan2_40mm`, 250, false, true)

-- server side (OneSync), for player id src
GiveWeaponToPed(GetPlayerPed(src), `vehicle_weapon_titan2_40mm`, 250, false, true)

The data comes from GTA V's own game files. Parity, the FiveM anticheat, shows these names instead of raw hashes in your server logs. Browse all GTA V weapons.