GetPlayerScore

From SA-MP Wiki

Jump to: navigation, search


Description:

This function returns a player's score as it was set using SetPlayerScore


Parameters:
(playerid)
playeridThe player to get the score of.


Return Values:

The player's score.


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

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools
Navigation
Toolbox
In other languages