GivePlayerMoney
Puts Groschen in the player’s purse - or takes them out.
A negative amount takes, never more than the purse holds. The money is the game’s own coin item, moved by the same road as
GivePlayerItem: a gift is a record of the server’s from the moment it is given, and a take is an exact order. 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. The restore GivePlayerMoney(pid, saved - GetPlayerMoney(pid)) ends with the saved purse: GetPlayerMoney counts
what was given a moment ago, so the difference is right before the player’s game has made it.
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
