mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-20 02:28:34 +00:00
fix(imports/waitFor): normalise timeout
This commit is contained in:
1 parent
4ed709df9a
commit
6817ae6649
1 file changed
+6
-2
@@ -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
|
||||
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