note Help Needed
This wiki is the result of an ongoing community effort — thank you all for helping!
If you want to provide changes to this page then please click here.
PlayerHasClockEnabled
Description
Checks whether the player has their in-game clock enabled. (TogglePlayerClock)
Name | Description |
---|---|
playerid | The player whose clock you want to check. |
Returns
true - The clock is enabled.
false - The clock isn't enabled, or the specified player does not exist.
Examples
public OnPlayerConnect(playerid)
{
TogglePlayerClock(playerid, true); // Show the clock
if (PlayerHasClockEnabled(playerid))
{
SendClientMessage(playerid, COLOR_WHITE, "The clock is enabled.");
}
return 1;
}
Notes
tip
Time is not synced with other players! Time can be synced using SetPlayerTime.
Related Functions
- SetPlayerTime: Set a player's time.
- SetWorldTime: Set the global server time.
- TogglePlayerClock: Toggle the clock in the top-right corner.