mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-19 06:46:04 +01:00
bit'o linting
This commit is contained in:
@@ -193,22 +193,12 @@ end
|
|||||||
function ensureNetToVeh(vehNetID)
|
function ensureNetToVeh(vehNetID)
|
||||||
if Config.System.Debug then print("^6Bridge^7: ^3ensureNetToVeh^7: ^2Requesting NetworkDoesNetworkIdExist^7(^6"..vehNetID.."^7)") end
|
if Config.System.Debug then print("^6Bridge^7: ^3ensureNetToVeh^7: ^2Requesting NetworkDoesNetworkIdExist^7(^6"..vehNetID.."^7)") end
|
||||||
local timeout = 100
|
local timeout = 100
|
||||||
while not NetworkDoesNetworkIdExist(vehNetID) and timeout > 0 do
|
while not NetworkDoesNetworkIdExist(vehNetID) and timeout > 0 do timeout -= 1 Wait(10) end
|
||||||
timeout -= 1
|
if not NetworkDoesNetworkIdExist(vehNetID) then return 0 end
|
||||||
Wait(10)
|
|
||||||
end
|
|
||||||
if not NetworkDoesNetworkIdExist(vehNetID) then
|
|
||||||
return 0
|
|
||||||
end
|
|
||||||
timeout = 100
|
timeout = 100
|
||||||
local vehicle = NetToVeh(vehNetID)
|
local vehicle = NetToVeh(vehNetID)
|
||||||
while not DoesEntityExist(vehicle) and vehicle ~= 0 and timeout > 0 do
|
while not DoesEntityExist(vehicle) and vehicle ~= 0 and timeout > 0 do timeout -= 1 Wait(10) end
|
||||||
timeout -= 1
|
if not DoesEntityExist(vehicle) then return 0 end
|
||||||
Wait(10)
|
|
||||||
end
|
|
||||||
if not DoesEntityExist(vehicle) then
|
|
||||||
return 0
|
|
||||||
end
|
|
||||||
return vehicle
|
return vehicle
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user