SetPlayerScore
From SA-MP Wiki
(Difference between revisions)
Revision as of 13:32, 29 January 2014 Smithy (Talk | contribs) ← Previous diff |
Revision as of 04:13, 5 February 2014 Connor Mead (Talk | contribs) Next diff → |
||
Line 24: | Line 24: | ||
[[Category:Scripting Functions]] | [[Category:Scripting Functions]] | ||
+ | |||
+ | [[fr:SetPlayerScore]] |
Revision as of 04:13, 5 February 2014
Description:
Set a player's score. Players' scores are shown in the scoreboard (hold TAB).
(playerid, score)
playerid | The ID of the player to set the score of. |
score | The value to set the player's score to. |
Return Values:
This function does not return any specific values.
public OnPlayerDeath(playerid, killerid, reason) { // Add 1 to this killer's score. if(killerid != INVALID_PLAYER_ID) { SetPlayerScore(killerid, GetPlayerScore(killerid) + 1); } return 1; }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- GetPlayerScore: Get the score of a player.