Get data for the currently equipped weapon.
exports.ox_inventory:getCurrentWeapon()You can also listen for changes to the current weapon using an event handler.
AddEventHandler('ox_inventory:currentWeapon', function(currentWeapon)
CurrentWeapon = currentWeapon
end)- currentWeapon?:
table- ammo?:
stringName of the item used as ammo. - hash:
number - label:
string - melee:
boolean - metadata:
table- ammo?:
numberAmount of ammo loaded into the weapon. - components?:
tableArray of component item names, used to apply weapon components. - durability?:
number - registered?:
stringName of the player that bought the weapon at a shop. - serial?:
string
- ammo?:
- name:
stringName of the item. - slot:
number - weight:
number
- ammo?: