forked from Simnation/Main
resources/[jobs]/[civ]/mh_jobgarage/client/chiefsettings.lua aktualisiert
This commit is contained in:
parent
24779ed578
commit
cbdc3609b8
1 changed files with 38 additions and 36 deletions
|
@ -48,47 +48,49 @@ function OpenChiefAddVehicleMenu()
|
||||||
|
|
||||||
for i = 1, #vehicles, 1 do
|
for i = 1, #vehicles, 1 do
|
||||||
local isSpawned, mods = IsVehicleSpawned(vehicles[i].plate)
|
local isSpawned, mods = IsVehicleSpawned(vehicles[i].plate)
|
||||||
while not isSpawned do
|
|
||||||
Wait(100)
|
|
||||||
end
|
|
||||||
print("Chiefsettings: "..mods)
|
|
||||||
|
|
||||||
table.insert(opt, {
|
if isSpawned then
|
||||||
title = "Kennzeichen: "..mods.plate,
|
print("Chiefsettings: "..mods)
|
||||||
description = "Deine Ersatzschlüssel: "..vehicles[i].keys,
|
|
||||||
icon = 'car',
|
|
||||||
onSelect = function()
|
|
||||||
local value = lib.inputDialog("Schlüsselkasten", {
|
|
||||||
{type = "input", label = "Anzeigename", description = "Anzeigename wie die anderen den sehen!"},
|
|
||||||
{type = "number", label = "Schlüsselanzahl", description = "Anzahl der Ersatzschlüssel.", min = 1, max = vehicles[i].keys},
|
|
||||||
{type = "number", label = "Rang", description = "Ab welchen Rang darf man das Fahrzeug Fahren?"}
|
|
||||||
})
|
|
||||||
|
|
||||||
QBCore.Functions.TriggerCallback('mh_jobgarage:AddVehicleToJob', function(cb)
|
table.insert(opt, {
|
||||||
if cb.status then
|
title = "Kennzeichen: "..mods.plate,
|
||||||
Notification("Schlüsselkasten", cb.text, cb.type)
|
description = "Deine Ersatzschlüssel: "..vehicles[i].keys,
|
||||||
lib.hideContext('ChiefAddVehicleMenu')
|
icon = 'car',
|
||||||
QBCore.Functions.TriggerCallback('mh_jobgarage:CallVehiclesInfo', function(cb)
|
onSelect = function()
|
||||||
OpenMenu(cb)
|
local value = lib.inputDialog("Schlüsselkasten", {
|
||||||
end, Player.job.name)
|
{type = "input", label = "Anzeigename", description = "Anzeigename wie die anderen den sehen!"},
|
||||||
else
|
{type = "number", label = "Schlüsselanzahl", description = "Anzahl der Ersatzschlüssel.", min = 1, max = vehicles[i].keys},
|
||||||
Notification("Schlüsselkasten", cb.text, cb.type)
|
{type = "number", label = "Rang", description = "Ab welchen Rang darf man das Fahrzeug Fahren?"}
|
||||||
if cb.key then
|
})
|
||||||
SetNewWaypoint(Config.KeyMaker.x, Config.KeyMaker.y)
|
|
||||||
|
QBCore.Functions.TriggerCallback('mh_jobgarage:AddVehicleToJob', function(cb)
|
||||||
|
if cb.status then
|
||||||
|
Notification("Schlüsselkasten", cb.text, cb.type)
|
||||||
|
lib.hideContext('ChiefAddVehicleMenu')
|
||||||
|
QBCore.Functions.TriggerCallback('mh_jobgarage:CallVehiclesInfo', function(cb)
|
||||||
|
OpenMenu(cb)
|
||||||
|
end, Player.job.name)
|
||||||
|
else
|
||||||
|
Notification("Schlüsselkasten", cb.text, cb.type)
|
||||||
|
if cb.key then
|
||||||
|
SetNewWaypoint(Config.KeyMaker.x, Config.KeyMaker.y)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end, mods.plate, value)
|
||||||
end, mods.plate, value)
|
end
|
||||||
end
|
})
|
||||||
})
|
|
||||||
|
|
||||||
lib.registerContext({
|
lib.registerContext({
|
||||||
id = "ChiefAddVehicleMenu",
|
id = "ChiefAddVehicleMenu",
|
||||||
title = "Schlüsselkasten",
|
title = "Schlüsselkasten",
|
||||||
description = "Füge ein Fahrzeug hinzu.",
|
description = "Füge ein Fahrzeug hinzu.",
|
||||||
options = opt
|
options = opt
|
||||||
})
|
})
|
||||||
|
|
||||||
lib.showContext("ChiefAddVehicleMenu")
|
lib.showContext("ChiefAddVehicleMenu")
|
||||||
|
else
|
||||||
|
Notification("Schlüsselkasten", "Kein Fahrzeug gefunden!", "warning")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Notification("Schlüsselkasten", "Keine Fahrzeuge von dir Gefunden!", "error")
|
Notification("Schlüsselkasten", "Keine Fahrzeuge von dir Gefunden!", "error")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue