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.
GetPlayerScore
Description
This function returns a player's score as it was set using SetPlayerScore
Name | Description |
---|---|
playerid | The player to get the score of. |
Returns
The player's score.
Examples
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;
}
Related Functions
- SetPlayerScore: Set the score of a player.
- GetPlayerPing: Get the ping of a player.