forked from Simnation/Main
Update main.lua
This commit is contained in:
parent
f16f396bee
commit
3b2d052eba
1 changed files with 19 additions and 10 deletions
|
@ -453,7 +453,7 @@ function NavigateToPlayer(driver, taxi, playerCoords)
|
||||||
-- Fahrer-Verhalten verbessern
|
-- Fahrer-Verhalten verbessern
|
||||||
SetDriverAggressiveness(driver, 0.0)
|
SetDriverAggressiveness(driver, 0.0)
|
||||||
SetDriverAbility(driver, 1.0)
|
SetDriverAbility(driver, 1.0)
|
||||||
}
|
end
|
||||||
|
|
||||||
function MonitorTaxiProgress(taxi, driver, playerCoords)
|
function MonitorTaxiProgress(taxi, driver, playerCoords)
|
||||||
print("^2[TAXI DEBUG]^7 Monitoring taxi progress...")
|
print("^2[TAXI DEBUG]^7 Monitoring taxi progress...")
|
||||||
|
@ -552,7 +552,8 @@ function RecoverStuckTaxi(taxi, driver, playerCoords)
|
||||||
print("^3[TAXI DEBUG]^7 Using direct approach for recovery")
|
print("^3[TAXI DEBUG]^7 Using direct approach for recovery")
|
||||||
TaskVehicleDriveToCoordLongrange(driver, taxi, playerCoords.x, playerCoords.y, playerCoords.z, 25.0, 786603, 5.0)
|
TaskVehicleDriveToCoordLongrange(driver, taxi, playerCoords.x, playerCoords.y, playerCoords.z, 25.0, 786603, 5.0)
|
||||||
end
|
end
|
||||||
}
|
end
|
||||||
|
|
||||||
|
|
||||||
function MonitorTaxiArrival(taxi, driver, playerCoords)
|
function MonitorTaxiArrival(taxi, driver, playerCoords)
|
||||||
print("^2[TAXI DEBUG]^7 Monitoring taxi arrival...")
|
print("^2[TAXI DEBUG]^7 Monitoring taxi arrival...")
|
||||||
|
@ -620,6 +621,7 @@ function MonitorTaxiArrival(taxi, driver, playerCoords)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- Event für Einsteigen ins Taxi
|
-- Event für Einsteigen ins Taxi
|
||||||
RegisterNetEvent('taxi:enterTaxi', function()
|
RegisterNetEvent('taxi:enterTaxi', function()
|
||||||
print("^2[TAXI DEBUG]^7 Player entering taxi")
|
print("^2[TAXI DEBUG]^7 Player entering taxi")
|
||||||
|
@ -823,7 +825,8 @@ function NavigateToDestination(driver, taxi, destination)
|
||||||
-- Fahrer-Verhalten verbessern
|
-- Fahrer-Verhalten verbessern
|
||||||
SetDriverAggressiveness(driver, 0.0)
|
SetDriverAggressiveness(driver, 0.0)
|
||||||
SetDriverAbility(driver, 1.0)
|
SetDriverAbility(driver, 1.0)
|
||||||
}
|
end
|
||||||
|
|
||||||
|
|
||||||
function MonitorTaxiRide(destination, price)
|
function MonitorTaxiRide(destination, price)
|
||||||
print("^2[TAXI DEBUG]^7 Monitoring taxi ride...")
|
print("^2[TAXI DEBUG]^7 Monitoring taxi ride...")
|
||||||
|
@ -909,13 +912,15 @@ function MonitorTaxiRide(destination, price)
|
||||||
|
|
||||||
-- Neues Timeout setzen (1 Minute)
|
-- Neues Timeout setzen (1 Minute)
|
||||||
rideTimeout = GetGameTimer() + (60 * 1000)
|
rideTimeout = GetGameTimer() + (60 * 1000)
|
||||||
}
|
end
|
||||||
|
|
||||||
lastPos = taxiCoords
|
lastPos = taxiCoords
|
||||||
Wait(2000)
|
Wait(2000)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
}
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function SelfDriveTaxi()
|
function SelfDriveTaxi()
|
||||||
print("^2[TAXI DEBUG]^7 Player driving taxi themselves")
|
print("^2[TAXI DEBUG]^7 Player driving taxi themselves")
|
||||||
|
@ -940,7 +945,8 @@ function SelfDriveTaxi()
|
||||||
description = 'Du fährst das Taxi jetzt selbst. Nutze /stoptaxi um es zu beenden.',
|
description = 'Du fährst das Taxi jetzt selbst. Nutze /stoptaxi um es zu beenden.',
|
||||||
type = 'info'
|
type = 'info'
|
||||||
})
|
})
|
||||||
}
|
end
|
||||||
|
|
||||||
|
|
||||||
function ExitTaxi()
|
function ExitTaxi()
|
||||||
print("^2[TAXI DEBUG]^7 Player exiting taxi")
|
print("^2[TAXI DEBUG]^7 Player exiting taxi")
|
||||||
|
@ -962,7 +968,8 @@ function ExitTaxi()
|
||||||
SetTimeout(5000, function()
|
SetTimeout(5000, function()
|
||||||
DespawnTaxi()
|
DespawnTaxi()
|
||||||
end)
|
end)
|
||||||
}
|
end
|
||||||
|
|
||||||
|
|
||||||
function DespawnTaxi()
|
function DespawnTaxi()
|
||||||
print("^2[TAXI DEBUG]^7 Despawning taxi")
|
print("^2[TAXI DEBUG]^7 Despawning taxi")
|
||||||
|
@ -1046,12 +1053,13 @@ function DespawnTaxi()
|
||||||
|
|
||||||
print("^2[TAXI DEBUG]^7 Taxi despawn completed (no driver)")
|
print("^2[TAXI DEBUG]^7 Taxi despawn completed (no driver)")
|
||||||
end
|
end
|
||||||
}
|
end
|
||||||
|
|
||||||
function CalculateDistanceToCoords(coords)
|
function CalculateDistanceToCoords(coords)
|
||||||
local playerCoords = GetEntityCoords(PlayerPedId())
|
local playerCoords = GetEntityCoords(PlayerPedId())
|
||||||
return #(playerCoords - coords)
|
return #(playerCoords - coords)
|
||||||
}
|
end
|
||||||
|
|
||||||
|
|
||||||
-- Command um Taxi zu stoppen
|
-- Command um Taxi zu stoppen
|
||||||
RegisterCommand('stoptaxi', function()
|
RegisterCommand('stoptaxi', function()
|
||||||
|
@ -1148,7 +1156,8 @@ function EndTaxiRide()
|
||||||
DespawnTaxi()
|
DespawnTaxi()
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
}
|
end
|
||||||
|
|
||||||
|
|
||||||
-- Thread zum Überwachen des Einsteigens ins Taxi (ohne qb-target)
|
-- Thread zum Überwachen des Einsteigens ins Taxi (ohne qb-target)
|
||||||
CreateThread(function()
|
CreateThread(function()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue