SA-MP Forums Archive
SetPlayerTime & SetWorldTime. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SetPlayerTime & SetWorldTime. (/showthread.php?tid=128299)



SetPlayerTime & SetWorldTime. - Miguel - 17.02.2010

I noticed SetPlayerTime has three params, being two of them hour and minutes while SetWorldTime has just hour as a time parameter. My question is if the minutes of SetPlayerTime does change the server time or if it just changes the player clock?

Thanks!


Re: SetPlayerTime & SetWorldTime. - iron_war_lord - 17.02.2010

SetPlayerTime only changes the player's time.
SetWorldTime changes both server and player's time.


Re: SetPlayerTime & SetWorldTime. - [HiC]TheKiller - 17.02.2010

Quote:
Originally Posted by Zinglish
SetPlayerTime only changes the player's time.
SetWorldTime changes both server and player's time.
That was not related to what he was saying.

I'm not fully sure why SetWorldTime doesn't have a minute variable, you could always just do this

pawn Код:
#undef SetWorldTime
#define SetWorldTime(%1, %2) for(new i; i<MAX_PLAYERS; i++) if(IsPlayerConnected(i)) SetPlayerTime(i, %1, %2);



Re: SetPlayerTime & SetWorldTime. - Miguel - 17.02.2010

What I wanted to know was if the minutes changes the time or if just changes the player(s) clock?

Example:

It's 23:58 and it's dark but is it going to be darker at 23:59?




Re: SetPlayerTime & SetWorldTime. - iron_war_lord - 17.02.2010

To answer your example, yes. It's just like real life.

So what you're asking is if the SetPlayerTime function directly affect the actual time of day? If so, then yes, it does. If you want to see it in action then try my Basic Clock (In my sig)...


Re: SetPlayerTime & SetWorldTime. - adsy - 17.02.2010

include the filterscript provided to the config called gl_realtime

much easier than scripting it


Re: SetPlayerTime & SetWorldTime. - Miguel - 17.02.2010

Quote:
Originally Posted by adsy
include the filterscript provided to the config called gl_realtime
much easier than scripting it
I made my own real time system and I think Zinglish answered my question already.

Thanks everyone!