SA-MP Forums Archive
How can I make this work? - 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 can I make this work? (/showthread.php?tid=331283)



How can I make this work? - iLcke - 04.04.2012

Something like this;
Код:
SetWorldTime(%s, Hour);
Obviously the %s is repersenting something and the hour is that something.
Is this even possible?

I mean either use SetWorldTime, or atleast loop it through all players with SetPlayerTime too?


Re: How can I make this work? - RenSoprano - 04.04.2012

Hello use this to change your world time in your server SetWorldTime(13); this is my GMT +2


Re: How can I make this work? - iLcke - 04.04.2012

.. Obviously.

I'm talking about the script will get the worlds time and actually set the time to that time.


Re: How can I make this work? - Vince - 04.04.2012

SetWorldTime only accepts integer values, so if your 'Hour' variable contains the right value simply use:
pawn Код:
// Ex:
new Hour = 13;

SetWorldTime(Hour);



Re: How can I make this work? - aRoach - 04.04.2012

Make a timer that repeat every one hour and make it or:
pawn Код:
new Time[ 2 ];
gettime( Time[ 0 ], Time[ 1 ] );
SetPlayerTime( playerid, Time[ 0 ], Time[ 1 ] );



Re: How can I make this work? - iLcke - 04.04.2012

Nevermind.

EDIT: Yeah figured it out right after my second post.