Skip to main content

mCasino.api.roulette

Game

mCasino Roulette API

Types​

RoulettePlayer​

interface RoulettePlayer {
ply: Player
amount: {number}--

Array of bet amounts where key = color

}

Roulette Player

Functions​

bet​

This item only works when running on the client. Client
mCasino.api.roulette.bet(
amount: number,--

The amount to bet

color: number--

The color to bet on

) → ()

Attempts to place a bet for roulette, handles amount checking and throws popup if insufficient balance

getPlayers​

mCasino.api.roulette.getPlayers() → {RoulettePlayer}

Returns the players for the game

getStates​

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

Returns the states for the game

getState​

mCasino.api.roulette.getState() → string

Returns the current state for the game

getValue​

mCasino.api.roulette.getValue() → number

Returns the target value of the spin (1 = red, 2 = black, 3 = green)

game​

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

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

calculatePlayers​

mCasino.api.roulette.calculatePlayers(
onPlayer: (
ply: Player,
steamId: string,
color: number,
amount: number
) → (),--

Called on every player per color

onWin?: () → ()--

Called when player wins

) → {number}

Calculates the totals and processes players for viewing