mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
Merge pull request #462 from BerkieBb/patch-1
fix(client/functions): Return right result when with hasitem callback
This commit is contained in:
@@ -20,12 +20,8 @@ end
|
||||
function QBCore.Functions.HasItem(item)
|
||||
local p = promise.new()
|
||||
QBCore.Functions.TriggerCallback('QBCore:HasItem', function(result)
|
||||
if result then
|
||||
p:resolve(true)
|
||||
end
|
||||
p:resolve(false)
|
||||
p:resolve(result)
|
||||
end, item)
|
||||
|
||||
return Citizen.Await(p)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user