- 80%
This commit is contained in:
1 parent
ebc47ba5d7
commit
66934fd68a
16 files changed
+169
-124
No files matched your search
@@ -1,26 +1,31 @@
|
||||
|
||||
local function spawn()
|
||||
local data = ps.callback('md-drugs:server:GetMerchant')
|
||||
local data = Bridge.Callback.Trigger('md-drugs:server:GetMerchant')
|
||||
local model = 's_m_m_trucker_01'
|
||||
ps.requestModel(model)
|
||||
requestModel(model)
|
||||
local ped = CreatePed(4, model, data.loc.x, data.loc.y, data.loc.z, data.loc.w, false, true)
|
||||
Freeze(ped, true, data.loc.w)
|
||||
ps.entityTarget(ped, {
|
||||
Bridge.Target.AddLocalEntity(ped, {
|
||||
{
|
||||
label = Bridge.Language.Locale('merchant.targetOpen'),
|
||||
action = function()
|
||||
local options = {}
|
||||
for k, v in pairs (data.items) do
|
||||
local itemInfo = Bridge.Inventory.GetItemInfo(k)
|
||||
options[#options+1] = {
|
||||
title = ps.getLabel(k),
|
||||
title = itemInfo.label,
|
||||
description = '$'..v,
|
||||
icon = ps.getImage(k),
|
||||
icon = itemInfo.image,
|
||||
action = function()
|
||||
TriggerServerEvent('md-drugs:server:purchaseGoods', k)
|
||||
end
|
||||
}
|
||||
end
|
||||
ps.menu('Travelling Merchant', 'Travelling Merchant', options)
|
||||
Bridge.Menu.Open({
|
||||
id = 'merchant_menu',
|
||||
title = Bridge.Language.Locale('merchant.menuTitle'),
|
||||
options = options
|
||||
})
|
||||
end
|
||||
}
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user