Update functions.lua

This commit is contained in:
Mustache Dom authored and GitHub committed 2024-10-01 17:41:24 -07:00
1 parent 9b69d6306c
commit 41b66a45e4
1 file changed
+3 -5
+3 -5
View File
@@ -102,8 +102,8 @@ function Itemcheck(source, item, amount)
return false return false
end end
elseif inventory == 'ox' then elseif inventory == 'ox' then
local item = ox_inventory:GetItem(source, item, nil, false) local items = exports.ox_inventory:GetItem(source, item, nil, false)
if item.count >= amount then if items.count >= amount then
return true return true
else else
Notifys(source, 'You Need ' .. amount .. ' Of ' .. GetLabels(item) .. ' To Do This', 'error') Notifys(source, 'You Need ' .. amount .. ' Of ' .. GetLabels(item) .. ' To Do This', 'error')
@@ -111,9 +111,7 @@ function Itemcheck(source, item, amount)
end end
end end
end end
RegisterCommand('testitem', function(source)
if not Itemcheck(source,'lockpick', 10) then return end
end)
function GetCoords(source) function GetCoords(source)
local ped = GetPlayerPed(source) local ped = GetPlayerPed(source)
local playerCoords = GetEntityCoords(ped) local playerCoords = GetEntityCoords(ped)