getWeaponDamage
GET_WEAPON_DAMAGE0x3133B907D8B32053The GTA V native GET_WEAPON_DAMAGE of the WEAPON namespace, as LS:MP client scripts call it: the global function getWeaponDamage, in JavaScript and in Lua.
getWeaponDamage(weaponHash: Hash, componentHash: Hash): numbergetWeaponDamage(weaponHash: Hash, componentHash: Hash): numberUsage
JavaScript
const value = getWeaponDamage(weaponHash, componentHash);Lua
local value = getWeaponDamage(weaponHash, componentHash)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
weaponHash | Hash | number | integer |
componentHash | Hash | number | integer |
Returns
float JavaScript number, Lua numberNotes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
This native does not return damages of weapons from the melee and explosive group.
Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
Reference
- Namespace
- Weapon WEAPON
- In the game
float GET_WEAPON_DAMAGE(Hash weaponHash, Hash componentHash)- Hash
0x3133B907D8B32053- Formerly
_GET_WEAPON_DAMAGE