SA-MP Forums Archive
how to Save server time? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: how to Save server time? (/showthread.php?tid=298555)



how to Save server time? - DexToxz - 21.11.2011

how and where did i save my Weather to 5 and my time to 23?
like to Freeze this Weather and this Time to all the players


Re: how to Save server time? - Richie - 21.11.2011

SetWorldTime( 23); to set server time.
SendRconCommand("weather 5"); to set weather to 5.


Re: how to Save server time? - DexToxz - 21.11.2011

Where to write it?


Re: how to Save server time? - Richie - 21.11.2011

Inside OnGameModeInit maybe.
Or in a command.


Re: how to Save server time? - Elorreli - 21.11.2011

Quote:
Originally Posted by Richie
Посмотреть сообщение
SetWorldTime( 23); to set server time.
SendRconCommand("weather 5"); to set weather to 5.
There's actually a SetWeather function.

pawn Код:
SetWeather(5);



Re: how to Save server time? - DexToxz - 21.11.2011

i want to Freeze the time at 23:00 ...


Re: how to Save server time? - DexToxz - 21.11.2011

Help me Please!! How to freeze time at 23:00 ?


Re: how to Save server time? - Richie - 21.11.2011

Set SetWorldTime( 23); inside a timer, that sets the time 23 always.
pawn Код:
forward SettingTime();
public SettingTime()
{
     SetWorldTime( 23);
     return 1;
}
and in OnGameModeInit:
pawn Код:
SetTimer("SettingTime", 600000, 1); // This will set time to 23 every 10 minuttes
preferably put SetWorldTime( 23); inside another timer you have