06.01.2010, 22:51
I don't like to use many timers:
Just remember if you want things to happen only once, reset the variables:
pawn Code:
new
Second,
Minute,
Hour;
pawn Code:
public OnGameModeInit()
{
SetTimer("OneSecondTimer", 1000, true);
return 1;
}
pawn Code:
public OneSecondTimer()
{
Second ++;
if(Second == 60) // one minute
{
SendClientMessage(playerid, COLOR, "60 Seconds.");
Minute ++;
Second == 0;
}
else if(Minute == 60) // one hour
{
SendClientMessage(playerid, COLOR, "60 Minutes.");
Hour ++;
Minute == 0;
}
return 1;
}
pawn Code:
Variable == 0;