10.08.2017, 22:32
I want to do a global timer, but i don't know how to use y_timers, for now i'm using SetTimerEx and Public function, but i want to change.
I want to be constantly called (every 1 second)
I have this in my gamemode:
And i changed like this:
Is it ok how did I replace or something is wrong?
I want to be constantly called (every 1 second)
I have this in my gamemode:
Code:
OnGameModeInit: global_timer = SetTimer("timerglobal", 1000, 1); GameModeExitFunc: KillTimer(unjailtimer); //// forward timerglobal public timerglobal() { .... return 1; }
Code:
OnGameModeInit: defer global_timer(); GameModeExitFunc: stop global_timer(); //// task global_timer[1000]() { .... }