GetPlayerScore
From SA-MP Wiki
(Difference between revisions)
Revision as of 20:27, 3 January 2011 Hiddos (Talk | contribs) (Removed it again, didn't work?) ← Previous diff |
Current revision Connor Mead (Talk | contribs) |
||
Line 1: | Line 1: | ||
{{Scripting}} | {{Scripting}} | ||
- | {{Title}} | ||
{{Description|This function returns a player's score as it was set using [[SetPlayerScore]]}} | {{Description|This function returns a player's score as it was set using [[SetPlayerScore]]}} | ||
- | |||
{{Parameters|playerid}} | {{Parameters|playerid}} | ||
Line 29: | Line 27: | ||
[[Category:Scripting Functions]] | [[Category:Scripting Functions]] | ||
+ | |||
+ | [[fr:GetPlayerScore]] |
Current revision
Description:
This function returns a player's score as it was set using SetPlayerScore
(playerid)
playerid | The 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; }
[edit]
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- SetPlayerScore: Set the score of a player.
- GetPlayerPing: Get the ping of a player.