SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 17/01/2020, 08:24 PM   #11
Huge Clucker
Proxus's Avatar
Join Date: May 2018
Location: United Kingdom
Posts: 364
Reputation: 17
Default Re: Make the world time the same for everyone

Originally Posted by PPC23 View Post
Minutes doesn't change the sky, they change only the clock. If the time is 10:00 or 10:59 - it will be the same. The sky will change at 11, etc..

You can use this to set the hour and minutes for all the players to match the clock:
pawn Code:
#undef SetWorldTime
#define SetWorldTime(%1, %2) for(new i = 0,j = GetPlayerPoolSize();i <= j;i++) if(IsPlayerConnected(i)) SetPlayerTime(i, %1, %2);
Minutes doesn't matter to the sky neither in SetWorldTime or SetPlayerTime.
I'm not sure if I'm misunderstanding.
This function is only relevant for players that do not use a passing clock - see TogglePlayerClock.
^ On SetWorldTime

I'm using TogglePlayerClock, and I'm pretty sure it changes the time as time goes by, I could be wrong?
Developer @ Trucknation
"Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity"

Proxus is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
World Time AnonScripter Scripting Help 3 03/10/2013 09:01 PM
how to set player's time same as world time memeli11 Scripting Help 0 02/05/2013 07:35 PM
Get World Time VirSpectorX Help Archive 13 22/06/2010 01:36 PM
[HELP] World time. screw Help Archive 3 02/01/2010 06:46 PM
[HELP]How To set world time. arachimi Help Archive 1 22/12/2009 10:10 PM

All times are GMT. The time now is 09:00 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.