Skip to main content
All exports below are client-side and are called on the resource name roadcarradio.
Renamed in 2.5.0. The old roadcarplay exports (blockCarPlay, unblockCarPlay) no longer exist. See the migration table if you are updating an existing integration.

Access Control

Use these when another script needs the screen out of the way — during a cutscene, in a jail cell, while a minigame is running.

isBlocked

Check whether the screen is currently blocked.
boolean
true if the screen is blocked, false otherwise

blockCarRadio

Prevent the screen from being opened. If it is already open, it stays open until the player closes it — this blocks opening, it does not force a close.

unblockCarRadio

Lift the block and allow the screen to be opened again.
A block set by your script is not cleared automatically. If your script errors out between blocking and unblocking, the player is left without a radio until the resource restarts — always unblock in the same code path that blocks, including your failure paths.

useRoadCarRadio

Whether the player may currently use the radio at all — takes the install status, the driver-only rule and the vehicle damage threshold into account.
boolean
true if the player can open the screen right now

Rear Camera

IsRearCameraActive

Whether the rear camera is on screen right now. Useful if your own script draws to the screen and should get out of the way.
boolean
true while the rear camera is rendering

ToggleRearCamera

Turn the rear camera on or off, exactly as the keybind does. Respects every rule the keybind respects — driver only, allowed vehicle types, and needCarRadioInstalled.
boolean
true if the camera is on after the call, false if it was refused or turned off
Returns false when the camera could not open — for example on a vehicle type that is not in Config.RearCamera.vehicleTypes, or when the player is not the driver. Check the return value instead of assuming it worked.

Server API

getCarsCarRadioIsInstalled

Server-side. Returns every licence plate that has a radio installed, straight from the in-memory cache — no database round trip.
table
Array of { plate = string } entries
Only meaningful with Config.NeedInstall = true. With the install system switched off, no vehicle is ever written to the table and the list stays empty — every vehicle has a radio in that mode.

Commands

Commands and keybinds the resource registers

Custom Music API

Serve your own music library over HTTP