nut.currency - brianhang/nutscript2 GitHub Wiki

Description

The currency system is used to allow characters to have money.

Fields

Name Description
entity The name of the entity to spawn for nut.currency.spawn. By default, this is "nut_money".
model A string containing the model for money entities. By default, this is "models/props_lab/box01a.mdl".
plural The plural name for the currency being used.
symbol The symbol for the currency.
singular The singular name for the currency being used.

Functions

Name Description
nut.currency.set Sets the currency for the gamemode.
nut.currency.spawn Creates a money entity that contains a given amount of money.
nut.currency.toString Returns the string representation for a certain amount of money.

Extensions

Name Description
Character:giveMoney Gives a character a given amount of money.
Character:takeMoney Takes a certain amount of money from a character.