GetWeaponList
ESX.GetWeaponList(byHash)
Arguments
Argument | Type | Explanation |
---|---|---|
byHash | boolean | since version 1.9.1 |
This function gets the complete weapon list and label.
Example
local list = ESX.GetWeaponList()
for i=1, #list, 1 do
print(list[i].name .. ' => ' .. list[i].label)
end
Other example since version 1.9.1
local list = ESX.GetWeaponList(true)
for hash, weapon in pairs(list) do
print(('weapon name: %s, hash: %s'):format(weapon.name, hash))
end