Update functions.lua
This commit is contained in:
1 parent
99e8afe653
commit
222d5051d2
1 file changed
+8
-2
@@ -142,12 +142,18 @@ end
|
|||||||
|
|
||||||
function GetCops(number)
|
function GetCops(number)
|
||||||
if number == 0 then return true end
|
if number == 0 then return true end
|
||||||
|
local need = false
|
||||||
|
local nope = false
|
||||||
QBCore.Functions.TriggerCallback('md-drugs:server:GetCoppers', function(amount)
|
QBCore.Functions.TriggerCallback('md-drugs:server:GetCoppers', function(amount)
|
||||||
|
if amount >= number then need = true else Notify('You Need '.. number - amount .. ' More Cops To Do This', 'error') nope = true end
|
||||||
if amount >= number then return amount == true else Notify('You Need '.. number - amount .. ' More Cops To Do This', 'error') end
|
|
||||||
end)
|
end)
|
||||||
|
repeat
|
||||||
|
Wait(100)
|
||||||
|
until need or nope
|
||||||
|
if need then return true end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function GetImage(img)
|
function GetImage(img)
|
||||||
if GetResourceState('ox_inventory') == 'started' then
|
if GetResourceState('ox_inventory') == 'started' then
|
||||||
local Items = exports['ox_inventory']:Items()
|
local Items = exports['ox_inventory']:Items()
|
||||||
|
|||||||
Reference in new issue
Block a user