Skip to content

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.

GivePlayerMoney(pid, groschen)
Parameter Type
pid number the player
groschen number how much; negative takes

boolean - false when not connected

GivePlayerMoney(winner, 50)
GivePlayerMoney(pid, -12.5) -- the fine
GivePlayerMoney(pid, saved - GetPlayerMoney(pid)) -- the purse as the mode saved it

GetPlayerMoney · GivePlayerItem · the Items and inventory group of the index