Timers
#1

Fast question , why at most of game modes , when a timer is created , you have to use Killtimer on gamemodeexit?
Wouldn't it already kill it self?
Explain it please.
Reply
#2

pawn Код:
// Top of GM

new TimerKilling;

// Timer

TimerKilling = SetTimerEx(....);

// OnGameModeExit

KillTimer(TimerKilling);
To kill the timer, you have to define a variable.
Reply
#3

i know , the question is , why on gamemodeexit i have to kill it?
Reply
#4

From what I read of his doubts OnGameModeExit you said, but you can kill him in any public.
Reply
#5

Quote:
Originally Posted by .FuneraL.
Посмотреть сообщение
pawn Код:
// Top of GM

new TimerKilling;

// Timer

TimerKilling = SetTimerEx(....);

// OnGameModeExit

KillTimer(TimerKilling);
To kill the timer, you have to define a variable.
He's asking why not how!

@ Question: Yes, I think it gets killed already on exit. So you don't have to kill it OnGameModeExit (That's how all my codes go, I never had to kill a timer on exit).
Reply
#6

if u are going to change a gamemode like /rcon changemode then if the timer isn't killed or stopped then it will be running. But i donot kill timers but yes if it is related to players like SetTimer used at OnPlayerConnect then i destroy or kill it at OnPlayerDisconnect.
That's what all i know
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)