1
0
Fork 0
forked from Simnation/Main

Update stations.lua

This commit is contained in:
Nordi98 2025-07-30 08:20:25 +02:00
parent 560e1271a5
commit 7cc5122c1d

View file

@ -494,6 +494,7 @@ RegisterNetEvent('taxi:enterStationVehicle', function(data)
-- Verbesserte Fahrer-Einstellungen -- Verbesserte Fahrer-Einstellungen
SetDriverAbility(driver, 1.0) -- Maximale Fahrfähigkeit SetDriverAbility(driver, 1.0) -- Maximale Fahrfähigkeit
SetDriverAggressiveness(driver, 0.0) -- Minimale Aggressivität SetDriverAggressiveness(driver, 0.0) -- Minimale Aggressivität
SetPedDriveByClipsetHash(driver, GetHashKey("DRIVE_SLOW"))
-- Fahrer-Outfit (nur wenn es ein anpassbarer Ped ist) -- Fahrer-Outfit (nur wenn es ein anpassbarer Ped ist)
if driverHash == GetHashKey("mp_m_freemode_01") or driverHash == GetHashKey("mp_f_freemode_01") then if driverHash == GetHashKey("mp_m_freemode_01") or driverHash == GetHashKey("mp_f_freemode_01") then
@ -824,15 +825,18 @@ function StartStationTaxiRide(stationId, vehicleId, vehicle, driver, destination
AddTextComponentString("Taxi Ziel") AddTextComponentString("Taxi Ziel")
EndTextCommandSetBlipName(destinationBlip) EndTextCommandSetBlipName(destinationBlip)
-- Zum Ziel fahren mit verbesserter Navigation -- Zum Ziel fahren mit verbesserter Navigation und geduldiger Fahrweise
TaskVehicleDriveToCoordLongrange(driver, vehicle, destination.x, destination.y, destination.z, 25.0, 786603, 5.0) -- Niedrigere Geschwindigkeit und angepasste Fahrweise
local drivingStyle = 786603 -- Normal/Vorsichtig
TaskVehicleDriveToCoordLongrange(driver, vehicle, destination.x, destination.y, destination.z, 20.0, drivingStyle, 10.0)
-- Fahrt überwachen -- Fahrt überwachen
CreateThread(function() CreateThread(function()
local lastPos = GetEntityCoords(vehicle) local lastPos = GetEntityCoords(vehicle)
local stuckCounter = 0 local stuckCounter = 0
local maxStuckCount = 5 local maxStuckCount = 10
local rideTimeout = GetGameTimer() + (5 * 60 * 1000) -- 5 Minuten Timeout local rideTimeout = GetGameTimer() + (10 * 60 * 1000) -- 5 Minuten Timeout
while DoesEntityExist(vehicle) and DoesEntityExist(driver) do while DoesEntityExist(vehicle) and DoesEntityExist(driver) do
local vehicleCoords = GetEntityCoords(vehicle) local vehicleCoords = GetEntityCoords(vehicle)
@ -887,8 +891,9 @@ function StartStationTaxiRide(stationId, vehicleId, vehicle, driver, destination
TaskVehicleTempAction(driver, vehicle, 6, 2000) -- Turn right TaskVehicleTempAction(driver, vehicle, 6, 2000) -- Turn right
Wait(1000) Wait(1000)
-- Neue Route zum Ziel -- Neue Route zum Ziel mit geduldiger Fahrweise
TaskVehicleDriveToCoordLongrange(driver, vehicle, destination.x, destination.y, destination.z, 25.0, 786603, 5.0) local drivingStyle = 786603 -- Normal/Vorsichtig
TaskVehicleDriveToCoordLongrange(driver, vehicle, destination.x, destination.y, destination.z, 20.0, drivingStyle, 10.0)
stuckCounter = 0 stuckCounter = 0
end end