-
Notifications
You must be signed in to change notification settings - Fork 12
/
client.lua
30 lines (25 loc) · 913 Bytes
/
client.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
local ox_inventory = exports.ox_inventory
RegisterCommand('policestash', function()
ox_inventory:openInventory('stash', 'example_stash')
end)
RegisterCommand('ownedstash', function()
ox_inventory:openInventory('stash', {id='example_stash_2', owner=1})
end)
RegisterCommand('pstash', function(src, args)
ox_inventory:openInventory('stash', {id='example_stash_3', owner=tonumber(args[1]) or 1})
end)
RegisterCommand('lazystash', function()
if ox_inventory:openInventory('stash', 'lazyStash') == false then
TriggerServerEvent('ox:lazyStash')
ox_inventory:openInventory('stash', 'lazyStash')
end
end)
exports('testburger', function(data, slot)
print(json.encode(slot, {indent=true}))
ox_inventory:useItem(data, function(data)
if data then
print(json.encode(data, {indent=true}))
ox_inventory:notify({text = 'You ate a delicious '..data.name})
end
end)
end)