24.08.2011, 12:53
SetTimer doesn't work!
Under OnGameModeInIt()
But the timer doesn't run. It doesn't print "testing..." every second on the server host screen. What have I done wrong?
Under OnGameModeInIt()
pawn Code:
SetTimer("Timers",1000,1);
pawn Code:
forward Timers();
public Timers()
{
printf("testing...");
/*if(GameMinutes > 0 || GameSeconds > 0)
{
GameSeconds--;
if(GameSeconds == -1)
{
GameMinutes--;
GameSeconds = 59;
}
}
if(GameMinutes == 0 && GameSeconds == 0)
{
OnGameModeExit();
}
new tmpstr[50]; //Accommodate for string size
format(tmpstr,sizeof(tmpstr),"%02d:%02d",GameMinutes,GameSeconds);
TextDrawSetString(Timer,tmpstr);*/
return 1;
}