Vehicle radios
A vehicle radio is a speaker that follows the vehicle, with its own station and song list. The Vehicle radios setting decides where they come from.
| Mode | What happens |
|---|---|
| Off | No vehicle radios. |
| Installed by other scripts | Only radios another resource adds with AddVehicleRadio (a car audio shop, for example). |
| Every vehicle (default) | The radio of the vehicle you are in is created the first time you use it. |
Using it
In a vehicle, open the player (/tm:music or the phone app) and connect to the vehicle from Play on, or run /tm:carradio (or the short /carradio) to open the window already connected. The radio is heard around the vehicle within the Vehicle radio range setting. A player must be within the Vehicle connect range to control it.
Scripts that open a radio from outside the vehicle (a target option, a menu) call OpenVehicleRadio(netId).
Ownership
The framework decides who owns a vehicle (tm.fw.getVehicleOwner).
- The owner gets the radio's own favorites and playlists, saved against the plate.
- Everyone else gets stations and can play their own library through it, but cannot change the radio's saved library.
- A framework or vehicle with no owner information gives everyone the second experience.
AddVehicleRadio(netId, plate, label, owned) overrides that: true gives the radio its own library to every user, false never.
A radio is removed when its vehicle is deleted.