mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
Merge pull request #377 from Mojito-Fivem/fix/HasItem
Fixes QBCore.Functions.HasItem [Critical](!)
This commit is contained in:
@@ -18,13 +18,15 @@ function QBCore.Functions.GetCoords(entity)
|
||||
end
|
||||
|
||||
function QBCore.Functions.HasItem(item)
|
||||
local p = promise.new()
|
||||
QBCore.Functions.TriggerCallback('QBCore:HasItem', function(result)
|
||||
if result then
|
||||
return true
|
||||
p:resolve(true)
|
||||
end
|
||||
return false
|
||||
p:resolve(false)
|
||||
end, item)
|
||||
return false
|
||||
|
||||
return Citizen.Await(p)
|
||||
end
|
||||
|
||||
-- Utility
|
||||
|
||||
Reference in New Issue
Block a user