Currency

Allows players to store and spend money.

Functions

impulse.SpawnMoney(pos, amount, dropper)

View source »

Spawns a money entity.

Parameters

  • pos vector

    The position to spawn the money.

  • amount int

    Amount of money the money entity has.

  • dropper Entity optional

    The entity that dropped it.

Player:CanAfford(amount)

View source »

Returns if the player can spend money in their pocket without going negative.

Parameters

  • amount int

    Cost

Returns

  • bool

    Can the player afford it.

Player:CanAffordBank(amount)

View source »

Returns if the player can spend money in their ATM without going negative.

Parameters

  • amount int

    Cost

Returns

  • bool

    Can the player afford it from their ATM.

Player:GetBankMoney()

View source »

The amount of money a player has in their ATM.

Returns

  • int

    How much money the player has their ATM.

Player:GetMoney()

View source »

The amount of money a player has.

Returns

  • int

    How much money the player has.

Player:GiveBankMoney(amount)

View source »

Adds an amount of money to a player's ATM.

Parameters

  • amount int

    Amount of money to add.

Player:GiveMoney(amount)

View source »

Gives an amount of money to a player.

Parameters

  • amount int

    Amount of money to give.

Player:SetBankMoney(amount)

View source »

Set's amount of money in a player's ATM

Parameters

  • amount int

    Amount of money

Player:SetMoney(amount)

View source »

Set's a player's money

Parameters

  • amount int

    Amount of money

Player:TakeBankMoney(amount)

View source »

Takes an amount of money from a player's ATM.

Parameters

  • amount int

    Amount of money to take

Player:TakeMoney(amount)

View source »

Takes an amount of money from a player.

Parameters

  • amount int

    Amount of money to take