forked from Simnation/Main
Update main.lua
This commit is contained in:
parent
73ea263ffa
commit
8cbfc70b00
1 changed files with 18 additions and 4 deletions
|
@ -468,10 +468,24 @@ function MonitorTaxiProgress(taxi, driver, playerCoords)
|
|||
while DoesEntityExist(taxi) and DoesEntityExist(driver) do
|
||||
Wait(3000)
|
||||
|
||||
-- Check if taxi exists and is moving
|
||||
if not DoesEntityExist(taxi) or not DoesEntityExist(driver) then
|
||||
print("^1[TAXI DEBUG]^7 Taxi or driver no longer exists")
|
||||
return
|
||||
if not DoesEntityExist(taxi) then
|
||||
print("^1[TAXI DEBUG]^7 Taxi no longer exists! Taxi ID: " .. tostring(taxi))
|
||||
if currentTaxi == taxi then
|
||||
print("^1[TAXI DEBUG]^7 This was the current active taxi")
|
||||
else
|
||||
print("^1[TAXI DEBUG]^7 This was NOT the current active taxi. Current taxi: " .. tostring(currentTaxi))
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
if not DoesEntityExist(driver) then
|
||||
print("^1[TAXI DEBUG]^7 Driver no longer exists! Driver ID: " .. tostring(driver))
|
||||
if currentDriver == driver then
|
||||
print("^1[TAXI DEBUG]^7 This was the current active driver")
|
||||
else
|
||||
print("^1[TAXI DEBUG]^7 This was NOT the current active driver. Current driver: " .. tostring(currentDriver))
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
local currentPos = GetEntityCoords(taxi)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue