Skip to main content

mCasino.api.jackpot

Game

mCasino Jackpot API

Types​

JackpotPlayer​

interface JackpotPlayer {
ply: Player
sid: string--

Player SteamID

col: Color
}

Jackpot Player

Functions​

handleUpdate​

This item only works when running on the client. Client
mCasino.api.jackpot.handleUpdate(
panel: DPanel,--

The panel the update is being called to

onPlayer: (
chance: number
) → (),--

Called on every player

onLocalPlayer?: (
chance: number
) → (),--

Returns the local casino player if found

onStatus?: (status: string) → (),--

Updates to status

onWin?: () → ()--

Called when player wins

) → ()

Calculates and processes crash update for client consumption, implements panel.players with chance information

getPlayers​

mCasino.api.jackpot.getPlayers() → {JackpotPlayer}

Returns the players for the game

getStates​

mCasino.api.jackpot.getStates() → {string}

Returns the states for the game

getState​

mCasino.api.jackpot.getState() → string

Returns the current state for the game

game​

INTERNAL
mCasino.api.jackpot.game() → {}

Returns the internal game table, the contents of this table may change in updates

getTotalValue​

mCasino.api.jackpot.getTotalValue() → number?

Returns the total value of the spin, you should try use this first before .getTotalBets()

getTotalBets​

mCasino.api.jackpot.getTotalBets() → number

Calculates the total amount of bets from the current players