Installation

Drop it in, ensure it, done. No database, no API keys.

1. Install

  1. Unzip and place the AC_autoplay folder in your server's resources directory. Any category folder works, for example [standalone].
  2. Add this line to your server.cfg:
    cfg
    ensure AC_autoplay
  3. Restart the server. A brand new resource needs a full restart, not just a refresh.

Dependencies: none required. ox_lib is optional (nicer notifications). No database, no API keys.

2. Try it

  1. Get in a vehicle.
  2. Press F5 or type /autoplay.
  3. Paste a YouTube link in Search or on the Home bar, then press Play or Add to Queue.
  4. Everyone in or near the car hears it in 3D, in sync.

3. Tune it (optional)

Everything is configured in config.lua, which stays open and editable after escrow. You can change it and restart the resource. A few of the most common tweaks:

SettingDefaultWhat it does
OpenCommand / OpenKeyautoplay / F5How players open the UI.
ControlScopedriverdriver means only the driver controls playback, occupants means anyone inside can.
MaxDistance25How far the audio carries (metres).
Spatial3DtrueHRTF 3D positioning. Set false for legacy mono.
VoiceDucktrueDip music while talking on voice.

The full option list is on the Configuration page.

Anti-cheat note

AC AutoPlay uses no os.* or load calls, so it is anti-cheat friendly. For WaveShield style setups, whitelist the AC_autoplay:* events and the autoplay state bag.