SA-MP Forums Archive
Missing Game Clock/Days - 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: Missing Game Clock/Days (/showthread.php?tid=216636)



Missing Game Clock/Days - David5290 - 26.01.2011

My gamemode does not have a clock in it or a day, does anyone have a script for this? Or a solution. Much appreciated.


Re: Missing Game Clock/Days - David5290 - 26.01.2011

The regular game clock is what I need, I tried the gl_gametime and it did not work.


Re: Missing Game Clock/Days - 1337connor - 26.01.2011

Game modes don't usually... Search for a Clock filterscript..


Re: Missing Game Clock/Days - Kitten - 26.01.2011

You mean this?

pawn Код:
forward TimeUpdate();
new worldTime;

public OnPlayerConnect(playerid)
{
    SetTimer("TimeUpdate",65009, 1);
    TogglePlayerClock(playerid, 1);
    return 1;
}

public TimeUpdate()
{
        worldTime++;
        worldTime%=24;
        SetWorldTime(worldTime);
}



Re: Missing Game Clock/Days - David5290 - 26.01.2011

Yeah, thanks I got it. Still more problems though -_-


Re: Missing Game Clock/Days - Grim_ - 26.01.2011

You don't see the manual game clock that is usually displayed in the upper right hand corner of the screen? If so, then you need to use the TogglePlayerClock function to enable it when the player spawns. The following code should do you wonders:
pawn Код:
public OnPlayerSpawn( playerid )
{
   TogglePlayerClock( playerid, 1 );
   return 1;
}
For an explanation of the function, look here: https://sampwiki.blast.hk/wiki/TogglePlayerClock