forked from Simnation/Main
edit
This commit is contained in:
parent
7038c11f51
commit
92c426369b
7 changed files with 146 additions and 1 deletions
13
resources/[inventory]/nordi_hookah/server/main.lua
Normal file
13
resources/[inventory]/nordi_hookah/server/main.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
QBCore.Functions.CreateCallback('qb-hookah:removeTobacco', function(source, cb)
|
||||
local Player = QBCore.Functions.GetPlayer(source)
|
||||
if not Player then return cb(false) end
|
||||
|
||||
if Player.Functions.RemoveItem('shisha_tobacco', 1) then
|
||||
TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['shisha_tobacco'], "remove")
|
||||
cb(true)
|
||||
else
|
||||
cb(false)
|
||||
end
|
||||
end)
|
Loading…
Add table
Add a link
Reference in a new issue