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