Skip to content
M2O Scripting APIScripting reference
Global objectServer APIGenerated

Jukebox

const Jukebox: object

Defined in: server/api.d.ts:1387

Controls synchronized Mafia II jukebox playback by game jukebox identifier.

getState(jukeboxId): JukeboxState | null

Returns the synchronized state of a jukebox.

number

Game jukebox identifier.

JukeboxState | null

The current playback state, or null when the jukebox has no state.

playSong(jukeboxId, seed?): boolean

Starts synchronized playback on a jukebox.

number

Game jukebox identifier.

number

Optional deterministic selection seed.

boolean

True when playback was started for a known jukebox.

stop(jukeboxId): boolean

Stops synchronized playback on a jukebox.

number

Game jukebox identifier.

boolean

True when an active jukebox state was stopped.