mtasa-blue
mtasa-blue copied to clipboard
getTimerDetails returns strange numbers as the remaining time inside the timer function
Describe the bug
The getTimerDetails function returns strange numbers as the remaining time. This problem only occurs when we use getTimerDetails inside a timer function. Otherwise, it returns the correct remaining time.
Steps to reproduce
local exampleTimer
function timerCallback()
local remainingTime = getTimerDetails(sourceTimer)
print('Reamining time in callback: ', remainingTime)
end
exampleTimer = setTimer(timerCallback, 1000, 10)
setTimer(function()
local remainingTime = getTimerDetails(exampleTimer)
print('Remaining time beyond callback: ', remainingTime)
end, 100, 10) -- 100 or 1000
Version
Multi Theft Auto v1.6-release-22396
Additional context
No response
Relevant log output
No response
Security Policy
- [X] I have read and understood the Security Policy and this issue is not security related.