ed
This commit is contained in:
		
							parent
							
								
									582e03e2ff
								
							
						
					
					
						commit
						fe9c1cbef1
					
				
					 2 changed files with 5 additions and 18 deletions
				
			
		| 
						 | 
				
			
			@ -219,23 +219,8 @@ function SpawnTaxi(coords)
 | 
			
		|||
        return nil
 | 
			
		||||
    end
 | 
			
		||||
    
 | 
			
		||||
    -- Sicherstellen dass die Z-Koordinate über dem Boden ist
 | 
			
		||||
    local groundZ = 0.0
 | 
			
		||||
    local foundGround, z = GetGroundZFor_3dCoord(coords.x, coords.y, coords.z, groundZ, false)
 | 
			
		||||
    
 | 
			
		||||
    local finalZ = coords.z
 | 
			
		||||
    if foundGround then
 | 
			
		||||
        -- Sicherstellen dass wir nicht unter Wasser spawnen
 | 
			
		||||
        local waterZ = GetWaterHeight(coords.x, coords.y, coords.z)
 | 
			
		||||
        if waterZ > z then
 | 
			
		||||
            print("^3[TAXI DEBUG]^7 Water detected at spawn position, adjusting height")
 | 
			
		||||
            finalZ = waterZ + 2.0 -- 2 Meter über Wasser
 | 
			
		||||
        else
 | 
			
		||||
            finalZ = z + 0.5 -- 0.5 Meter über Boden
 | 
			
		||||
        end
 | 
			
		||||
    end
 | 
			
		||||
    
 | 
			
		||||
    local taxi = CreateVehicle(taxiModel, coords.x, coords.y, finalZ, coords.w, true, false)
 | 
			
		||||
    -- Direkt die Koordinaten aus der Config verwenden
 | 
			
		||||
    local taxi = CreateVehicle(taxiModel, coords.x, coords.y, coords.z, coords.w, true, false)
 | 
			
		||||
    
 | 
			
		||||
    if not DoesEntityExist(taxi) then
 | 
			
		||||
        print("^1[TAXI DEBUG]^7 Failed to create taxi vehicle!")
 | 
			
		||||
| 
						 | 
				
			
			@ -260,6 +245,8 @@ function SpawnTaxi(coords)
 | 
			
		|||
    return taxi
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
function SpawnTaxiDriver(vehicle)
 | 
			
		||||
    print("^2[TAXI DEBUG]^7 Spawning taxi driver...")
 | 
			
		||||
    
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -101,7 +101,7 @@ Config.MobileTaxiSpawns = {
 | 
			
		|||
    vector4(902.33, -143.8, 76.62, 327.11),
 | 
			
		||||
    vector4(-1277.46, -810.35, 17.13, 133.23),
 | 
			
		||||
    vector4(1705.39, 4803.73, 41.79, 91.83),
 | 
			
		||||
    vector4(-383.43, 6064.31, 31.5, 135.49)
 | 
			
		||||
    vector4(-383.43, 6064.31, 31.5, 135.49),
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
-- Bekannte Ziele mit festen Preisen
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue