TogglePlayerClock

From SA-MP Wiki

Jump to: navigation, search


Description:

Toggle the in-game clock (top-right corner) for a specific player. When this is enabled, time will progress at 1 minute per second. Weather will also interpolate (slowly change over time) when set using SetWeather/SetPlayerWeather.


Image:32px-Ambox_warning_orange.png

Note

Time is not synced with other players! Time can be synced using SetPlayerTime.


Parameters:
(playerid, toggle)
playeridThe player whose clock you want to enable/disable
toggle1 to show and 0 to hide. Hidden by default.


Return Values:

  • 1: The function executed successfully.
  • 0: The function failed to execute. The specified player does not exist.


Example Usage:

public OnPlayerConnect(playerid)
{
    TogglePlayerClock(playerid, 1); // Show the clock
    return 1;
}
Image:32px-Ambox_warning_orange.png

Note

Time will automatically advance 6 hours when the player dies.


Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools
Navigation
Toolbox
In other languages