Skip to content

Conversation

Zorono
Copy link
Contributor

@Zorono Zorono commented Jul 13, 2025

#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
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
Member

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

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