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
SetDriverAbility(driver, 1.0) -- Maximale Fahrfähigkeit
SetDriverAggressiveness(driver, 0.0) -- Minimale Aggressivität
SetPedDriveByClipsetHash(driver, GetHashKey("DRIVE_SLOW"))
-- Fahrer-Outfit (nur wenn es ein anpassbarer Ped ist)
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")
EndTextCommandSetBlipName(destinationBlip)
-- Zum Ziel fahren mit verbesserter Navigation
TaskVehicleDriveToCoordLongrange(driver, vehicle, destination.x, destination.y, destination.z, 25.0, 786603, 5.0)
-- Zum Ziel fahren mit verbesserter Navigation und geduldiger Fahrweise
-- 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
CreateThread(function()
local lastPos = GetEntityCoords(vehicle)
local stuckCounter = 0
local maxStuckCount = 5
local rideTimeout = GetGameTimer() + (5 * 60 * 1000) -- 5 Minuten Timeout
local maxStuckCount = 10
local rideTimeout = GetGameTimer() + (10 * 60 * 1000) -- 5 Minuten Timeout
while DoesEntityExist(vehicle) and DoesEntityExist(driver) do
local vehicleCoords = GetEntityCoords(vehicle)
@ -887,8 +891,9 @@ function StartStationTaxiRide(stationId, vehicleId, vehicle, driver, destination
TaskVehicleTempAction(driver, vehicle, 6, 2000) -- Turn right
Wait(1000)
-- Neue Route zum Ziel
TaskVehicleDriveToCoordLongrange(driver, vehicle, destination.x, destination.y, destination.z, 25.0, 786603, 5.0)
-- Neue Route zum Ziel mit geduldiger Fahrweise
local drivingStyle = 786603 -- Normal/Vorsichtig
TaskVehicleDriveToCoordLongrange(driver, vehicle, destination.x, destination.y, destination.z, 20.0, drivingStyle, 10.0)
stuckCounter = 0
end