View Single Post
Old 17/01/2020, 04:15 PM   #3
Huge Clucker
DomagojSellug's Avatar
Join Date: Sep 2016
Location: Croatia
Posts: 255
Reputation: 22
Default Re: Make the world time the same for everyone

pawn Code:
// Somewhere in your script;
new hour, minute, second;

public OnGameModeInit(){
    gettime(hour, minute, second); // get current server time
    SetTimer("updateWorldTime", 360000, true); // set a timer every hour
forward updateWorldTime();
public updateWorldTime(){
    gettime(hour, minute, second); // get current server time every hour so it's updated

    SetPlayerTime(playerid, hour, 0); // when player connects, it sets their time to the server time automatically which is updated every hour

That's the simplest I could write here, hope it helps!

San Andreas Multiplayer server based off Counter Strike: Global Offensive.

Join us today!

DomagojSellug is offline   Reply With Quote