HyperScript
Docs

← All of the Docs HyperEconomy

When another plugin moves money HyperEconomy

eventon economy deposit:HyperEconomy

Runs when another plugin pays a player through Vault. player is that player, if they are online

on economy deposit:
    send "&a+%economy format of {_amount}%" to player
    if {_balance} >= 1000000:
        broadcast "&6%{_name}% &7is a millionaire."

What this event gives a script

In the blockWhat it is
{_amount}What was moved
{_balance}What the player has now
{_currency}The currency's name
{_name}The player's name, which is there for a player who is offline too
eventon economy pay:HyperEconomy

Runs when another plugin moves money from one player to another: taken from the one and, in the same moment, the same sum given to the other. player is who paid; {_payer}, {_receiver} and {_amount} say the rest

What this event gives a script

In the blockWhat it is
{_payer}The payer
{_receiver}And
{_amount}Say the rest
{_balance}What the player has now
{_currency}The currency's name
{_name}The player's name, which is there for a player who is offline too
eventon economy withdraw:HyperEconomy

Runs when another plugin takes money from a player through Vault

on economy withdraw:
    log "%{_name}% paid %{_amount}% %{_currency}% and has %{_balance}% left"

What this event gives a script

In the blockWhat it is
{_amount}What was moved
{_balance}What the player has now
{_currency}The currency's name
{_name}The player's name, which is there for a player who is offline too
Guide and examples
on economy deposit:
    send "&a+%economy format of {_amount}%" to player
    if {_balance} >= 1000000:
        broadcast "&6%{_name}% &7is a millionaire."

on economy withdraw:
    log "%{_name}% paid %{_amount}% %{_currency}% and has %{_balance}% left"
SyntaxEffect
on economy deposit:Runs when another plugin pays a player through Vault. player is that player, if they are online
on economy pay:Runs when another plugin moves money from one player to another: taken from the one and, in the same moment, the same sum given to the other. player is who paid; {_payer}, {_receiver} and {_amount} say the rest
on economy withdraw:Runs when another plugin takes money from a player through Vault
  • Inside the blocks: {_amount} is what was moved, {_balance} what the player has now, {_currency} the currency's name and {_name} the player's name, which is there for a player who is offline too.
  • They run for what other plugins do. A script that changes currency "coins" of player itself does not set them off.