mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 22:22:46 +00:00
Update Hooks.md
This commit is contained in:
1 parent
820fe25f7a
commit
8af4fc8c63
1 file changed
+34
-2
@@ -144,14 +144,46 @@ local hookId = exports.ox_inventory:registerHook('buyItem', function(payload)
|
|||||||
return false
|
return false
|
||||||
end, {
|
end, {
|
||||||
print = true,
|
print = true,
|
||||||
typeFilter = {
|
itemFilter = {
|
||||||
General = true
|
water = true
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Prevents players from purchasing items at General stores.
|
Prevents players from purchasing items at General stores.
|
||||||
|
|
||||||
|
### craftItem
|
||||||
|
|
||||||
|
**Payload:**
|
||||||
|
|
||||||
|
- source: `number`
|
||||||
|
- benchId: `number`
|
||||||
|
- benchIndex: `number`
|
||||||
|
- recipe: `table`
|
||||||
|
- count: `number`
|
||||||
|
- duration: `number`
|
||||||
|
- ingredients: `table<string, number>`
|
||||||
|
- name: `string`
|
||||||
|
- slot: `number`
|
||||||
|
- weight: `number`
|
||||||
|
- toInventory: `number`
|
||||||
|
- toSlot: `number`
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
local hookId = exports.ox_inventory:registerHook('craftItem', function(payload)
|
||||||
|
print(json.encode(payload, { indent = true, sort_keys = true }))
|
||||||
|
return false
|
||||||
|
end, {
|
||||||
|
print = true,
|
||||||
|
itemFilter = {
|
||||||
|
lockpick = true
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
Prevent lockpicks from being crafted by players.
|
||||||
|
|
||||||
## removeHooks
|
## removeHooks
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
|
|||||||
Reference in new issue
Block a user