26.10.2010, 08:00
I want to enable war = 1; when 10.00 o'clock every day and change to war = 0; 11.00 o'clock every day, how i do
(Sorry, I bad English language.)
(Sorry, I bad English language.)
forward WarSync();
public OnGameModeInit()
{
// Set a repeating timer to check the time every second for precision
SetTimer("WarSync", 1000, true);
}
public WarSync()
{
new
hours,
minutes,
seconds;
// Save the time into the variables.
gettime(hours, minutes, seconds);
// Check if the hour of the day is 10 o'clock.
if (hours == 10)
war = 1;
else
war = 0;
}
if(hour == 10 && minutes == 0)
{
war = 1;
}
else if(hour == 11 && minutes == 0)
{
war = 0;
}