game_money

From Valve Developer Community
Jump to: navigation, search

<Counter-Strike: Global Offensive>  game_money is a point entity available in Counter-Strike: Global Offensive.

Entity description

An entity that can add or deduct money from players or teams.

Keyvalues

Targetname:

Name <string>
The targetname that other entities refer to this entity by.
Entity Scripts <scriptlist> (New with Left 4 Dead 2)
Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.
Script think function <string> (New with Left 4 Dead 2)
Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call.
Note:Try to avoid expensive operations in this function, as it may cause performance problems.

game_money:

Amount of money to add <integer>
Amount of money to add or deduct.
Note:Do not add + or - , to add or deduct money use inputs.
Award Text <string>
The text that will print in the chat next to the award amount. Will look like this: '+/-1000: <Award Text>'

Inputs

Base:

FireUser1 to FireUser4
Fire the OnUser outputs; see User Inputs and Outputs.

game_money:

SetMoneyAmount
Set the money value that will be awarded. (without awarding it)
AddTeamMoneyTerrorist
Add money to players on team TERRORIST.
AddTeamMoneyCT
Add money to players on team COUNTER TERRORIST.
AddMoneyPlayer
Add money directly to the player activating this entity. (doesn't print in chat)
SpendMoneyFromPlayer
If the player has [money amount] or more, take [money amount] away.

Outputs

Base:

OnUser1 to OnUser4
These outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see User Inputs and Outputs.

game_money:

OnMoneySpent
Fires when input SpendMoneyFromPlayer succeeded.
OnMoneySpentFail
Fires when input SpendMoneyFromPlayer failed. (Player didn't have enough money)