mCasino.api.crash
mCasino Crash API
Types
CrashPlayer
interface CrashPlayer {ply: Playerply_sid: string--
Player SteamID
amount: numbercashout: number--
Auto cashout amount
profit?: numbercashoutFinal?: numbercashedOut?: booleanlost?: boolean}Crash Player
Functions
handleUpdate
This item only works when running on the client. ClientmCasino.api.crash.handleUpdate(panel: DPanel,--
The panel the update is being called to
onStatus?: (status: string) → (),--
Updates to status
onWin?: () → ()--
Called when player wins
) → ()Calculates and processes crash update for client consumption
shouldStart
This item only works when running on the client. ClientmCasino.api.crash.shouldStart(lastState: string--
The last state before this update
) → booleanChecks whether the crash graph should start
shouldFinish
This item only works when running on the client. ClientmCasino.api.crash.shouldFinish(lastState: string--
The last state before this update
) → booleanChecks whether the crash graph should finish
bet
This item only works when running on the client. ClientmCasino.api.crash.bet(amount: number,--
The amount to bet
cashout: number--
The auto cashout amount
) → ()Attempts to place a bet, handles state, amount checking and throws popup if insufficient balance
getPlayers
Returns the players for the game
getStates
mCasino.api.crash.getStates() → {string}Returns the states for the game
getState
mCasino.api.crash.getState() → stringReturns the current state for the game
getValue
mCasino.api.crash.getValue() → numberReturns the target value of the crash
getCurrentValue
mCasino.api.crash.getCurrentValue() → numberReturns the current multiplier of the game
game
INTERNALmCasino.api.crash.game() → {}Returns the internal game table, the contents of this table may change in updates