Skip to content

Commit

Permalink
(PR) Updated key requirement to include new weed lab.
Browse files Browse the repository at this point in the history
Adds Config.KeyRequired check for new weed lab.
  • Loading branch information
GitMocha committed Mar 19, 2023
1 parent 1c3172e commit 98ad798
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions client/weed.lua
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,17 @@ RegisterNetEvent('ps-drugprocessing:EnterWWarehouse', function()
local pos = GetEntityCoords(ped)
local dist = #(pos - vector3(Config.WeedLab["enter"].coords.x, Config.WeedLab["enter"].coords.y, Config.WeedLab["enter"].coords.z))
if dist < 2 then
QBCore.Functions.TriggerCallback('ps-drugprocessing:validate_items', function(result)
if result.ret then
EnterWWarehouse()
else
QBCore.Functions.Notify(Lang:t("error.no_item", {item = result.item}))
end
end, {weedkey=1})
if Config.KeyRequired then
QBCore.Functions.TriggerCallback('ps-drugprocessing:validate_items', function(result)
if result.ret then
EnterWWarehouse()
else
QBCore.Functions.Notify(Lang:t("error.no_item", {item = result.item}))
end
end, {weedkey=1})
else
EnterWWarehouse()
end
end
end)

Expand Down

0 comments on commit 98ad798

Please sign in to comment.