Skip to content

Implement KashCheery's timerfix's features#1103

Closed
Zorono wants to merge 6 commits into
openmultiplayer:masterfrom
Zorono:master
Closed

Implement KashCheery's timerfix's features#1103
Zorono wants to merge 6 commits into
openmultiplayer:masterfrom
Zorono:master

Conversation

@Zorono

@Zorono Zorono commented Jul 13, 2025

Copy link
Copy Markdown
Contributor
#define GetTimerRemainingTime GetTimerRemaining
native KillAllTimers();
native IsTimerRunning(Timer:timerid);
native IsTimerPaused(Timer:timerid);
native PauseTimer(Timer:timerid);
native ContinueTimer(Timer:timerid);
native GetTimerInterval(Timer:timerid);
native SetTimerInterval(Timer:timerid, interval);
native GetTimerRemaining(Timer:timerid);
native GetRunningTimersCount();

stock bool:ToggleTimerPause(Timer:timerid)
{
    if(!IsValidTimer(timmerid))
        return false;
        
    if(IsTimerPaused(timerid))
        ContinueTimer(timerid);
    else
        PauseTimer(timerid);
    
    return true;
}

this is a fork of @NoPressF 's #1087

TODO:

native AddTimerHandler(Timer:timerid, handler[]);
native RemoveTimerHandler(Timer:timerid, handler[]);
native SetTimerDelay(Timer:timerid, delay);

@Zorono Zorono marked this pull request as ready for review July 13, 2025 00:28
@AmyrAhmady

Copy link
Copy Markdown
Member

You're mixing tabs and spaces A LOT for whatever reason which is not acceptable.
You also have errors in your code you need to fix first. The review can only begin if ci runners build it successfully and pass.

@AmyrAhmady

Copy link
Copy Markdown
Member

You must add the new functions in ITimer to the end, you're breaking the vtable's order

@Zorono

Zorono commented Oct 22, 2025

Copy link
Copy Markdown
Contributor Author

opening a new one at a later time due to conflicts and postponed requested changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants