GivePlayerMoney

From SA-MP Wiki

Jump to: navigation, search


Give (or take) money to/from a player.


Parameters:
(playerid, money)
playeridThe ID of the player to give money to.
moneyThe amount of money to give the player. Use a minus value to take money.


ReturnsThis function doesn't return a specific value


public OnPlayerDeath(playerid, killerid, reason)
{
   new string[32];
 
   // Award $10,000 to the killer
   GivePlayerMoney(killerid, 10000);
 
   format(string, sizeof(string), "You now have $%d.", GetPlayerMoney(killerid));
   SendClientMessage(killerid, 0xFFFFFFFF, string);
}

Related Functions

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

Personal tools