warning Not Translated
This page has not been translated into the language that your browser requested yet. The English content is being shown as a fallback.
If you want to contribute a translation for 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.