---
title: "PlayerHasClockEnabled | open.mp"
description: "Verifica se o jogador está com o relógio do jogo ativado."
canonical: https://omp.itsneufox.com/pt-BR/docs/scripting/functions/PlayerHasClockEnabled
language: pt-BR
---

# PlayerHasClockEnabled

## Descrição

Verifica se o jogador está com o relógio do jogo ativado. ([TogglePlayerClock](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/TogglePlayerClock))

| Nome | Descrição |
| --- | --- |
| playerid | O jogador cujo relógio você deseja verificar. |

## Retornos

**true** - O relógio está habilitado.

**false** – O relógio não está habilitado ou o jogador especificado não existe.

## Exemplos

```c
public OnPlayerConnect(playerid)
{
    TogglePlayerClock(playerid, true); // Mostrar o relógio

    if (PlayerHasClockEnabled(playerid))
    {
        SendClientMessage(playerid, COLOR_WHITE, "The clock is enabled.");
    }
    return 1;
}
```

## Notas

nota

O tempo não está sincronizado com outros jogadores! A hora pode ser sincronizada usando [SetPlayerTime](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/SetPlayerTime).

## Funções Relacionadas

-   [SetPlayerTime](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/SetPlayerTime): Defina o tempo de um jogador.
-   [SetWorldTime](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/SetWorldTime): Defina a hora global do servidor.
-   [TogglePlayerClock](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/TogglePlayerClock): Alterne o relógio no canto superior direito.
