SetPlayerTime & SetWorldTime.
#1

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!
Reply
#2

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

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);
Reply
#4

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?

Reply
#5

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)...
Reply
#6

include the filterscript provided to the config called gl_realtime

much easier than scripting it
Reply
#7

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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)