fixedmetadata logic for seeds from dealers

does anyone read these? peepee poopoo i forgot things i patched them
This commit is contained in:
Mustache Dom authored and GitHub committed 2024-02-04 23:57:33 -08:00
1 parent cea5054554
commit 0e04e0b156
1 file changed
+5 -2
+5 -2
View File
@@ -39,6 +39,7 @@ CreateThread(function()
local dealermenu = {}
if Config.StupidassNewQbItemName then
for k, v in pairs (QBConfig.ProductsStupidNameRewrite) do
if QBCore.Functions.GetPlayerData().metadata["dealerrep"] >= v.minrep then
dealermenu[#dealermenu + 1] = {
icon = "nui://"..Config.imagelink..QBCore.Shared.Items[v.name].image,
title = v.label,
@@ -52,9 +53,11 @@ CreateThread(function()
}
lib.registerContext({id = 'dealermenu',title = "Dealer Menu", options = dealermenu})
end
end
else
for k, v in pairs (QBConfig.Products) do
if QBCore.Functions.GetPlayerData().metadata["dealerrep"] >= v.minrep then
dealermenu[#dealermenu + 1] = {
icon = "nui://"..Config.imagelink..QBCore.Shared.Items[v.name].image,
title = v.label,
@@ -68,10 +71,10 @@ CreateThread(function()
}
lib.registerContext({id = 'dealermenu',title = "Dealer Menu", options = dealermenu})
end
end
end
end)
local function RandomDeliveryItemOnRep()
local myRep = QBCore.Functions.GetPlayerData().metadata["dealerrep"]
local availableItems = {}
@@ -365,4 +368,4 @@ end)
RegisterCommand('checkrep', function()
local drugrep = QBCore.Functions.GetPlayerData().metadata["dealerrep"]
QBCore.Functions.Notify("Current Rep: "..drugrep)
end)
end)