Audio::setRadioTrack

From RAGE Multiplayer Wiki
Revision as of 11:08, 2 November 2024 by Shr0x (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax


This function allows you to set a specific track to play on a radio station, such as when players are in a vehicle.

Required Params

  • radioStation: string — the name of the radio station
  • radioTrack: string — the name of the track to play

Return value

  • Undefined

Syntax

mp.game.audio.setRadioTrack(radioStation, radioTrack)

Example

// Set a track on a specific radio station
mp.game.audio.setRadioTrack('RADIO_03_HIPHOP_NEW', 'ARM1_RADIO_STARTS');

Radio Stations

  • RADIO_01_CLASS_ROCK
  • RADIO_02_POP
  • RADIO_03_HIPHOP_NEW
  • RADIO_04_PUNK
  • RADIO_05_TALK_01
  • RADIO_06_COUNTRY
  • RADIO_07_DANCE_01
  • RADIO_08_MEXICAN
  • RADIO_09_HIPHOP_OLD
  • RADIO_12_REGGAE
  • RADIO_13_JAZZ
  • RADIO_14_DANCE_02
  • RADIO_15_MOTOWN
  • RADIO_16_SILVERLAKE
  • RADIO_17_FUNK
  • RADIO_18_90S_ROCK
  • RADIO_19_USER

Example Radio Tracks

  • ARM1_RADIO_STARTS
  • RAD1_TRACK01
  • RAD2_TRACK02
  • FUNK_TRACK03
  • MEX1_TRACK01


See also