alt.clearTimeout
Used to clear a timeout early. If the timeout is cleared the code inside of the timeout is never executed.
See alt.setTimeout for more information.
Declaration
alt.clearTimeout(id: number): void
Usage
alt.clearTimeout(someTimeoutValue);
Real World Example
const someTimeoutValue = alt.setTimeout(() => {
alt.log('Client Says Hello!');
}, 5000);
alt.clearTimeout(someTimeoutValue);
These examples assume you have imported alt
from alt-client
.