mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 14:38:50 +00:00
new docs
This commit is contained in:
1 parent
3cebaf7fa5
commit
b5eba8423f
229 files changed
+6238
-10690
No files matched your search
@@ -0,0 +1,28 @@
|
||||
Get data for the currently equipped weapon.
|
||||
|
||||
```lua
|
||||
exports.ox_inventory:getCurrentWeapon()
|
||||
```
|
||||
|
||||
You can also listen for changes to the current weapon using an event handler.
|
||||
|
||||
```lua
|
||||
AddEventHandler('ox_inventory:currentWeapon', function(currentWeapon)
|
||||
CurrentWeapon = currentWeapon
|
||||
end)
|
||||
```
|
||||
|
||||
- currentWeapon?: `table`
|
||||
- ammo?: `string` Name of the item used as ammo.
|
||||
- hash: `number`
|
||||
- label: `string`
|
||||
- melee: `boolean`
|
||||
- metadata: `table`
|
||||
- ammo?: `number` Amount of ammo loaded into the weapon.
|
||||
- components?: `table` Array of component item names, used to apply weapon components.
|
||||
- durability?: `number`
|
||||
- registered?: `string` Name of the player that bought the weapon at a shop.
|
||||
- serial?: `string`
|
||||
- name: `string` Name of the item.
|
||||
- slot: `number`
|
||||
- weight: `number`
|
||||
Reference in new issue
Block a user