This commit is contained in:
Mustache Dom committed 2024-11-12 17:08:02 -08:00
1 parent 8df50c0417
commit 07c84ff640
11 files changed
+201 -103

No files matched your search

+13 -15
View File
@@ -16,21 +16,19 @@ CreateThread(function()
local loc = json.decode(v.coords)
dealer[k] = CreatePed(0, Ped,loc.x,loc.y, loc.z-1, loc.h, false, false)
Freeze(dealer[k], true, loc.h)
local options = {
{ icon = 'fas fa-user-secret', label = string.format(Lang.targets.Delivery.Deliver, v.name),
action = function()
local bool, item, amount, coords = lib.callback.await('md-drugs:server:GetDeliveryItem', false, k)
if bool then
Email(Lang.Delivery.emailn, Lang.Delivery.emailsub, string.format(Lang.Delivery.emailcon, amount, GetLabel(item)))
TriggerEvent('md-drugs:client:setLocation', {bool = bool, item = item, amount = amount, coords = coords})
end
end,
},
{ icon = "fa-solid fa-store", label = string.format(Lang.targets.Delivery.open, v.name),
action = function() TriggerEvent('md-drugs:client:opendealermenu') end,
}
}
AddMultiModel(dealer[k], options)
AddMultiModel(dealer[k], {
{ icon = 'fas fa-user-secret', label = string.format(Lang.targets.Delivery.Deliver, v.name),
action = function()
local bool, item, amount, coords = lib.callback.await('md-drugs:server:GetDeliveryItem', false, k)
if bool then
Email(Lang.Delivery.emailn, Lang.Delivery.emailsub, string.format(Lang.Delivery.emailcon, amount, GetLabel(item)))
TriggerEvent('md-drugs:client:setLocation', {bool = bool, item = item, amount = amount, coords = coords})
end
end,
},
{ icon = "fa-solid fa-store", label = string.format(Lang.targets.Delivery.open, v.name),
action = function() TriggerEvent('md-drugs:client:opendealermenu') end,
}}, dealer[k])
end
end)