mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
fix(imports/waitFor): normalise timeout
This commit is contained in:
@@ -11,8 +11,12 @@ function lib.waitFor(cb, errMessage, timeout)
|
||||
|
||||
if value ~= nil then return value end
|
||||
|
||||
if timeout or timeout == nil then
|
||||
timeout = tonumber(timeout) or 1000
|
||||
|
||||
if IsDuplicityVersion() then
|
||||
timeout /= 50;
|
||||
else
|
||||
timeout -= GetFrameTime() * 1000;
|
||||
end
|
||||
|
||||
local start = GetGameTimer()
|
||||
|
||||
Reference in New Issue
Block a user