28.09.2015, 13:29
You can use Getdate to get the real date, but I don't think there's any date in SAMP that you can set like in singleplayer.
To set the world time, use SetWorldTime, or to adjust minutes and seconds aswell, use SetPlayerTime.
If you want it to be the real time, create a 1-second timer and do:
To set the world time, use SetWorldTime, or to adjust minutes and seconds aswell, use SetPlayerTime.
If you want it to be the real time, create a 1-second timer and do:
Код:
new hour, minute, second; // Create 3 variables to store the real hours, minutes and seconds in Gettime(hour, minute, second); // Get the real time, and store the hours in "hour", minutes in "minute", and seconds in "second" foreach(Player, i) SetPlayerTime(playerid, hour, minute, second); // Loop through all players, and set their time to the real time