forked from Simnation/Main
Update stored.lua
This commit is contained in:
parent
dc849979f9
commit
e2212140b7
1 changed files with 5 additions and 5 deletions
|
@ -7,14 +7,14 @@ AddEventHandler('mh_garage:storeVehicle', function(zone)
|
||||||
local randomname, randomdes = SelectName()
|
local randomname, randomdes = SelectName()
|
||||||
|
|
||||||
local opt = {}
|
local opt = {}
|
||||||
|
print("1")
|
||||||
for i = 1, #vehicles, 1 do
|
for i = 1, #vehicles, 1 do
|
||||||
local veh_coords = GetEntityCoords(vehicles[1])
|
local veh_coords = GetEntityCoords(vehicles[1])
|
||||||
local distance = #(veh_coords - coords)
|
local distance = #(veh_coords - coords)
|
||||||
|
print("2")
|
||||||
if distance < 40.0 then
|
if distance < 40.0 then
|
||||||
local mods = QBCore.Functions.GetVehicleProperties(vehicles[i])
|
local mods = QBCore.Functions.GetVehicleProperties(vehicles[i])
|
||||||
|
print("3")
|
||||||
table.insert(opt, {
|
table.insert(opt, {
|
||||||
title = "Kennzeichen: "..mods.plate,
|
title = "Kennzeichen: "..mods.plate,
|
||||||
description = "Soll dieses Fahrzeug eingeparkt werden?",
|
description = "Soll dieses Fahrzeug eingeparkt werden?",
|
||||||
|
@ -35,14 +35,14 @@ AddEventHandler('mh_garage:storeVehicle', function(zone)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
print("4")
|
||||||
lib.registerContext({
|
lib.registerContext({
|
||||||
id = "StoredVehicles",
|
id = "StoredVehicles",
|
||||||
title = randomname,
|
title = randomname,
|
||||||
description = randomdes,
|
description = randomdes,
|
||||||
options = opt
|
options = opt
|
||||||
})
|
})
|
||||||
|
print("5")
|
||||||
lib.showContext("StoredVehicles")
|
lib.showContext("StoredVehicles")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue