forked from Simnation/Main
GARAGE
This commit is contained in:
parent
b8e1377a17
commit
1858eb31f4
3 changed files with 4 additions and 1 deletions
|
@ -101,7 +101,7 @@ function AddTargetOptions(zone)
|
||||||
table.insert(opt, {
|
table.insert(opt, {
|
||||||
type = "client",
|
type = "client",
|
||||||
event = "mh_garage:verwaltungVeh",
|
event = "mh_garage:verwaltungVeh",
|
||||||
icon = "",
|
icon = "hand",
|
||||||
label = "Fahrzeuge Verwalten",
|
label = "Fahrzeuge Verwalten",
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,6 +7,7 @@ AddEventHandler('mh_garage:retrieveVehicle', function(zone)
|
||||||
local opt = {}
|
local opt = {}
|
||||||
|
|
||||||
QBCore.Functions.TriggerCallback('mh_garage:CallVehicles', function(cb)
|
QBCore.Functions.TriggerCallback('mh_garage:CallVehicles', function(cb)
|
||||||
|
Debug(json.encode(cb))
|
||||||
for i = 1, #cb, 1 do
|
for i = 1, #cb, 1 do
|
||||||
table.insert(opt, {
|
table.insert(opt, {
|
||||||
title = cb[i].name,
|
title = cb[i].name,
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
RegisterNetEvent('mh_garage:verwaltungVeh')
|
RegisterNetEvent('mh_garage:verwaltungVeh')
|
||||||
AddEventHandler('mh_garage:verwaltungVeh', function()
|
AddEventHandler('mh_garage:verwaltungVeh', function()
|
||||||
QBCore.TriggerCallback('mh_garage:verwaltung', function(cb)
|
QBCore.TriggerCallback('mh_garage:verwaltung', function(cb)
|
||||||
|
Debug("Verwaltung CB: "..json.encode(cb))
|
||||||
if cb[1] ~= nil then
|
if cb[1] ~= nil then
|
||||||
local opt = {}
|
local opt = {}
|
||||||
|
|
||||||
|
@ -35,6 +36,7 @@ AddEventHandler('mh_garage:verwaltungVeh', function()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
function OpenVerwaltung(vehicleInfos)
|
function OpenVerwaltung(vehicleInfos)
|
||||||
|
Debug("OpenVerwaltung: "..json.encode(vehicleInfos))
|
||||||
local garages = {}
|
local garages = {}
|
||||||
for k, v in pairs(Config.Zonen) do
|
for k, v in pairs(Config.Zonen) do
|
||||||
table.insert(garages, v.name)
|
table.insert(garages, v.name)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue