forked from Simnation/Main
14 lines
458 B
Lua
14 lines
458 B
Lua
![]() |
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)
|