Business
Controls the business system which allows players to purchase items
Reference
Functions
impulse.Business.Define(name, buyableData)
View source »Renders a blur effect on a panel. Call this inside PANEL:Paint
Parameters
-
name
string
Buyable name
-
buyableData
Buyable data
See Also
impulse.SpawnBuyable(pos, ang, buyable, owner)
View source »Spawns a buyable as an entity
Parameters
-
pos
vector
-
ang
angle
-
buyable
string
Buyable name
-
owner
entity
Owner player
meta:CanBuy(name)
View source »Returns if a player can buy a buyable
Parameters
-
name
string
Buyable name
Tables
BuyableData
View source »A collection of data that defines how a buyable will behave
Fields
-
entity
string
optional
Entity class name
-
bench
string
optional
Bench class name
-
model
string
Model
-
description
string
Buyable description
-
price
int
Price
-
teams
optional
A table of teams that can buy this buyable
-
classes
optional
A table of classes that can buy this buyable
-
refund
boolean
default: false
Should this buyable be refunded on server crashes
-
refundAdd
int
default: 0
The amount to add to the price in the event of a refund being issued
-
removeOnTeamSwitch
boolean
default: false
Should the buyable be removed on team switch
-
postSpawn
function
optional
Called after the buyable is spawned (ent, ply) arguments passed
-
customCheck
function
optional
Determines if the buyable can be spawned based on return value (ply) arguments passed