---
title: "GetPlayerScore | open.mp"
description: "Esta função retorna a pontuação de um jogador conforme foi definida usando SetPlayerScore."
canonical: https://omp.itsneufox.com/pt-BR/docs/scripting/functions/GetPlayerScore
language: pt-BR
---

# GetPlayerScore

## Descrição

Esta função retorna a pontuação de um jogador conforme foi definida usando SetPlayerScore

| Nome | Descrição |
| --- | --- |
| playerid | O jogador do qual obter a pontuação. |

## Retornos

A pontuação do jogador.

## Exemplos

```c
public OnPlayerCommandText(playerid, text[])
{
    if (!strcmp(cmdtext, "/score", true))
    {
        new string[32];
        format(string, sizeof(string), "Your score: %i", GetPlayerScore(playerid));
        SendClientMessage(playerid, COLOR_ORANGE, string);
        return 1;
    }
    return 0;
}
```

## Funções Relacionadas

-   [SetPlayerScore](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/SetPlayerScore): Define a pontuação de um jogador.
-   [GetPlayerPing](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/GetPlayerPing): Obtenha o ping de um jogador.
