Staff command that sets how much of a currency one or more players have.

Summary

Methods

Returns the translated command description with every registered currency ID listed.
Sets the balance of a currency for every target and notifies the targets and staff.

Methods

Returns the translated command description with every registered currency ID listed.

Returns

  • String

CMD:on_run(actor, targets, amount, currency)

shared plugins/currencies/plugin/commands/sh_setmoney.lua:29

Sets the balance of a currency for every target and notifies the targets and staff.

Parameters

  • actor Player the player who ran the command
  • targets List<Player> players matched by the first command argument
  • amount String new balance, parsed with tonumber; negative values become 0
  • currency String optional, defaults to nil currency ID; the default currency is used when it is omitted, see Currencies:get_default_currency

Defined in