GivePlayerMoney
Puts Groschen in the player’s purse - or takes them out.
A negative amount takes. The money is the game’s own coin item, moved by the same road as GivePlayerItem, so the
inventory audit explains it. Rounded to tenths of a Groschen, the game’s own unit. A player
starts each visit with an empty purse while the server guards money, so the starting money is given here - in
OnPlayerSpawn for the first spawn, or when the mode’s own login restores a saved purse.
Syntax
Section titled “Syntax”GivePlayerMoney(pid, groschen)| Parameter | Type | |
|---|---|---|
pid |
number | the player |
groschen |
number | how much; negative takes |
Returns
Section titled “Returns”boolean - false when not connected
Example
Section titled “Example”GivePlayerMoney(winner, 50)GivePlayerMoney(pid, -12.5) -- the fineGivePlayerMoney(pid, saved - GetPlayerMoney(pid)) -- the purse as the mode saved itSee also
Section titled “See also”GetPlayerMoney · GivePlayerItem · the Items and inventory group of the index
