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 opt = {}
 | 
			
		||||
 | 
			
		||||
print("1")
 | 
			
		||||
    for i = 1, #vehicles, 1 do
 | 
			
		||||
        local veh_coords = GetEntityCoords(vehicles[1])
 | 
			
		||||
        local distance = #(veh_coords - coords)
 | 
			
		||||
 | 
			
		||||
print("2")
 | 
			
		||||
        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 +35,14 @@ AddEventHandler('mh_garage:storeVehicle', function(zone)
 | 
			
		|||
                    end
 | 
			
		||||
                end
 | 
			
		||||
            })
 | 
			
		||||
 | 
			
		||||
print("4")
 | 
			
		||||
            lib.registerContext({
 | 
			
		||||
                id = "StoredVehicles",
 | 
			
		||||
                title = randomname,
 | 
			
		||||
                description = randomdes,
 | 
			
		||||
                options = opt
 | 
			
		||||
            })
 | 
			
		||||
 | 
			
		||||
print("5")
 | 
			
		||||
            lib.showContext("StoredVehicles")
 | 
			
		||||
        end
 | 
			
		||||
    end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue