12.11.2018, 18:57
1 in-game hour is 1 minute in real life according to the GTA Wiki so a timer that loops every 24 minutes would be what you're looking for.
That example above will set the servers time to midnight when you first startup the server, this will then sync up with the timer which will loop continuously and send a message to all the players on the server every time the in-game clock strikes midnight.
PHP код:
forward NewDay();
public NewDay()
{
SendClientMessageToAll(-1, "Rise and Shine, It's a new day!");
return 1;
}
public OnGameModeInit()
{
SetWorldTime(0);
SetTimer("NewDay", 1440000, true);
return 1;
}