SA-MP Forums Archive
toggle clock for virtual world - 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: toggle clock for virtual world (/showthread.php?tid=168693)



toggle clock for virtual world - Kaye - 17.08.2010

How can I have the clock synced for all players, but only for one virtual world? Meaning I do not want it shown for the other worlds. Thanks.


Re: toggle clock for virtual world - RichyB - 17.08.2010

You could try this OnPlayerUpdate
pawn Код:
if(GetPlayerVirtualWorld(playerid) == MAIN_WORLD)
{
new Hour, Minute, Second;
gettime(Hour, Minute, Second);
SetPlayerTime(House, Minute);
TogglePlayerClock(playerid, 1);
}
else
{
TogglePlayerClock(playerid, 0);
}
Replace MAIN_WORLD with the world you want to Sync.