well, to be honest, currently that doesn't really make sense to me,
but i think we're getting closer:
so you want to stop a timer that is set and didn't reach it callback
yet, correct?
once you know that you don't need the timer anymore, CloseHandle
and you're done.
If the timer already reched the callback and you don't want further
code to be executed, just return Plugin_Handled, that will do it as well as i think that the timer's already r.i.p.'d once it reaches the callback, at least
you can't close it with CloseHandle anymore.
PHP Code:
testtimer[client] = CreateTimer(10.0, TestFunction, client, TIMER_FLAG_NO_MAPCHANGE)
public Action:TestFunction(Handle:timer, any: client)
{
if(noneedforfunction[client] == 1)
{
return Plugin_Handled
}
else
{
//continue with the callback
or simply close the handle from outside the callback with CloseHandle
so that the callback won't be called at all.
It shouldn't make a difference if you return Plugin_Handled or Plugin_Stop,
i think that's only a difference for repeated timers.
I'm sorry if it doesn't make sense what i'm writing, i need some sleep