Skip to main content

mCasino

mCasino API

Functions​

setRootPanel​

This item only works when running on the client. Client
mCasino.setRootPanel(panelName: string) → ()

Sets the given panel name as a root panel

getRootPanel​

This item only works when running on the client. Client
mCasino.getRootPanel(panel: DPanel) → DPanel

Traverses the panel's parents until a registered root panel is found

getRootPlayer​

This item only works when running on the client. Client
mCasino.getRootPlayer(panel: DPanel) → Player

Traverses the panel's parents until a registered root panel is found and returns the player based on its entity or local

getRootEntity​

This item only works when running on the client. Client
mCasino.getRootEntity(panel: DPanel) → Entity?

Traverses the panel's parents until a registered root panel is found and returns the entity if found

setPanel​

This item only works when running on the client. Client
mCasino.setPanel(
panel: DPanel,
gameId?: string
) → ()

Registers the panel to receive updates through the SendUpdate() method. This should be set when the panel is created, and deregistered (set gameId to nil) when the panel is removed

setPanelOverride​

This item only works when running on the client. Client
mCasino.setPanelOverride(
panel: string,--

Panel to override e.g. mCasino_crash

newPanel: string--

Panel to use instead e.g. mCasino_devKit_crash

) → ()

Overrides the default panels used in mCasino with your own

alert​

This item only works when running on the client. Client
mCasino.alert(
title: string,
message: string
) → ()

Shows an alert popup to the user

notify​

This item only works when running on the server. Server
mCasino.notify(
ply: Player,
type: number,--

1 = popup, 2 = animated popup

duration: number,
title: string,
message: string
) → ()

Shows an alert popup to the user

getLang​

mCasino.getLang(translationId: string) → ()

Returns the translation for a given ID based on the selected language