GetPlayerMoney
From SA-MP Wiki
GetPlayerMoney
The function GetPlayerMoney retrieves the amount of money a player has.
(playerid)
| playerid | The ID of the player. |
| Returns | The players money |
public OnPlayerDeath(playerid, killerid, reason) { new string[48]; format(string, sizeof(string), "You had $%i. Now you've got nothing.", GetPlayerMoney(playerid)); SendClientMessage(playerid, 0xFFFFFFAA, string); ResetPlayerMoney(playerid); }
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- GivePlayerMoney: Give a player money.
- ResetPlayerMoney: Set the money of a player to $0.
