Day started
#8

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.

PHP код:
forward NewDay();
public 
NewDay()
{
    
SendClientMessageToAll(-1"Rise and Shine, It's a new day!");
    return 
1;
}
public 
OnGameModeInit()
{
    
SetWorldTime(0);
    
SetTimer("NewDay"1440000true);
    return 
1;

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.
Reply


Messages In This Thread
Day started - by Cezar98 - 11.11.2018, 05:24
Re: Day started - by v1k1nG - 11.11.2018, 12:19
Re: Day started - by IdonTmiss - 11.11.2018, 12:24
Re: Day started - by DIRTYBYT3 - 11.11.2018, 12:28
Re: Day started - by Cezar98 - 11.11.2018, 15:09
Re: Day started - by RogueDrifter - 11.11.2018, 15:35
Re: Day started - by Cezar98 - 11.11.2018, 15:39
Re: Day started - by ItsRobinson - 12.11.2018, 18:57
Re: Day started - by Gammix - 12.11.2018, 22:29

Forum Jump:


Users browsing this thread: 4 Guest(s)