15.12.2010, 02:16
ow...try this...
pawn Код:
public OnGameModeInit()
{
WorldTime = SetWorldTime(random(24));// this before the timer
SetTimer("SetHour", 5000, 1); // 3600000 = 1 hour in ms - Time was set to 5000 ms for testing purposes.
}
forward SetHour()
public SetHour()
{
if (WorldTime == 24) WorldTime = 0;
SetWorldTime((WorldTime)+1);
return SetTimer(SetHour,"5000",false); // if its doesn't work remove this line and try again...
// + i don't this its gonna work cuz i think that OnGameModeInit() is only when its loads the GM...
//just use gl_realtime that comes with the server files... this is will change the time every one hour(in game)
}