---
title: "OnPlayerEnterCheckpoint | open.mp"
description: "Esta callback é chamada quando um jogador entre em um checkpoint colocado para aquele jogador."
canonical: https://omp.itsneufox.com/pt-BR/docs/scripting/callbacks/OnPlayerEnterCheckpoint
language: pt-BR
---

# OnPlayerEnterCheckpoint

## Descrição

Esta callback é chamada quando um jogador entre em um checkpoint colocado para aquele jogador.

| Nome | Descrição |
| --- | --- |
| playerid | O jogador que entrou no checkpoint. |

## Retorno

Sempre é chamada primeiro em filterscripts.

## Exemplos

```c
//Neste exemplo o checkpoint é criado para o jogador quando spawna,
//o qual cria um veículo e desativa o checkpoint.
public OnPlayerSpawn(playerid)
{
    SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0);
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    CreateVehicle(520, 1982.6150, -221.0145, -0.2432, 82.2873, -1, -1, 60000);
    DisablePlayerCheckpoint(playerid);
    return 1;
}
```

## Notas

nota

Esta callback também pode ser chamada por NPC.

## Funções Relacionadas

-   [SetPlayerCheckpoint](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/SetPlayerCheckpoint): Cria o checkpoint para um jogador.
-   [DisablePlayerCheckpoint](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/DisablePlayerCheckpoint): Desativa o atual checkpoint do jogador.
-   [IsPlayerInCheckpoint](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/IsPlayerInCheckpoint): Verifica se o jogador está em checkpoint.
-   [SetPlayerRaceCheckpoint](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/SetPlayerRaceCheckpoint): Cria um checkpoint de corrida.
-   [DisablePlayerRaceCheckpoint](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/DisablePlayerRaceCheckpoint): Desativa o atual checkpoint de corrida do jogador.
-   [IsPlayerInRaceCheckpoint](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/IsPlayerInRaceCheckpoint): Verifica se o jogador está em um checkpoint de corrida.
