From 41b66a45e40df04d83291e1f3dd72090e310f927 Mon Sep 17 00:00:00 2001 From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com> Date: Tue, 1 Oct 2024 17:41:24 -0700 Subject: [PATCH] Update functions.lua --- server/functions.lua | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/server/functions.lua b/server/functions.lua index 5be0fa4..833a247 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -86,7 +86,7 @@ function GetLabels(item) if inventory == 'qb' then return QBCore.Shared.Items[item].label elseif inventory == 'ox' then - local items = exports.ox_inventory:Items() + local items = exports.ox_inventory:Items() return items[item].label end end @@ -102,8 +102,8 @@ function Itemcheck(source, item, amount) return false end elseif inventory == 'ox' then - local item = ox_inventory:GetItem(source, item, nil, false) - if item.count >= amount then + local items = exports.ox_inventory:GetItem(source, item, nil, false) + if items.count >= amount then return true else Notifys(source, 'You Need ' .. amount .. ' Of ' .. GetLabels(item) .. ' To Do This', 'error') @@ -111,9 +111,7 @@ function Itemcheck(source, item, amount) end end end -RegisterCommand('testitem', function(source) -if not Itemcheck(source,'lockpick', 10) then return end -end) + function GetCoords(source) local ped = GetPlayerPed(source) local playerCoords = GetEntityCoords(ped) @@ -337,4 +335,4 @@ RegisterServerEvent('md-drugs:server:AddMas', function(data) if not RemoveItem(src, data.item, 1) then return end RemoveItem(src, data.xt, 1) AddItem(src, data.recieve, data.amount) -end) \ No newline at end of file +end)