Missing Game Clock/Days
#1

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

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

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

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

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

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)