Commands and interface
Open the PMMS panel by key or command, every pmms_* command with its permissions, the /pmms_play flags and the settings remembered per player.
Goal: use PMMS in game and know what each command triggers.
Related files: config.lua (prefix, key binding) and permissions.cfg (command rights).
Open the panel
- Key binding: Q by default (
Config.keybind). It runs the/pmmscommand, so the player needs thecommand.pmmsACE. Each player can change the key in Settings › Key Bindings › FiveM, under the “Ouvrir Radio/TV” label. - Command:
/pmms.
The panel lists the players in range, sorted by distance. An admin (pmms.manage) also sees active players further away. From the panel: start a URL or a preset, pause, stop, seek, loop, volume, mute, lock, video and screen size, audio visualisation, attenuation, range, queue, copy to another entity, scaleform settings and settings saving (admins).
Commands
The names below use the shipped pmms prefix and _ separator. All commands are restricted: they require the command.<name> ACE, granted by permissions.cfg.
| Command | ACE granted to | Effect |
|---|---|---|
/pmms | builtin.everyone | Opens the control panel (also via the key binding). |
/pmms_play [url|preset|random] [options] | builtin.everyone | Starts a media on the closest media player. Without arguments: pauses or resumes that player. random picks a random preset. |
/pmms_pause | builtin.everyone | Pauses or resumes the closest media player. |
/pmms_stop | builtin.everyone | Stops the closest media player. |
/pmms_status | builtin.everyone | Shows or hides the status of nearby players; the choice is remembered. |
/pmms_presets | builtin.everyone | Lists the presets in the chat. |
/pmms_vol [0-100] | builtin.everyone | Personal volume applied to every media player, remembered for this player. Without a value: shows the current volume. |
/pmms_fix | builtin.everyone | Resets the player’s client-side media players, useful after a stuck display. |
/pmms_ctl list | lock | unlock | mute | unmute | next | pause | stop <handle> | loop <handle> on|off | group.admin | Advanced control by handle. The list output and help are written to the server console. |
/pmms_add <model> [label] [renderTarget] | group.admin | Adds or edits a model and saves it in models.json. |
/pmms_refresh_perms | group.admin | Asks every client to reload its permissions. |
/pmms_play flags
/pmms_play https://www.youtube.com/watch?v=XXXXXXXXXXX -video -volume 60 -range 40
/pmms_play lobby -loop
/pmms_play random -filter
The YouTube ID and the lobby preset are examples. The first argument that does not start with - is the URL or the preset.
| Flag | Resulting option | Effect |
|---|---|---|
-filter | filter = true | Enables the immersive filter. |
-nofilter | filter = false | Disables the immersive filter. |
-loop | loop = true | Loop playback (media with a duration). |
-offset <s> | offset | Starts at N seconds. |
-lock | locked = true | Starts the player locked. |
-video | video = true | Shows the video. |
-size <10-100> | videoSize | NUI video screen size. |
-mute | muted = true | Starts the player muted. |
-sra <0-10> | attenuation.sameRoom | Same-room attenuation. |
-dra <0-10> | attenuation.diffRoom | Different-room attenuation. |
-drv <0-1> | diffRoomVolume | Volume difference between rooms. |
-range <m> | range | Range, capped at Config.maxRange. |
-veh | vehicle = true | No observed effect: the vehicle option is read nowhere, the engine uses isVehicle. Set “vehicle” in the panel. |
-notveh | vehicle = false | No observed effect, for the same reason as -veh. |
-visualization <type> | visualization | Audio visualisation (key of Config.audioVisualizations). |
-volume <0-100> | volume | Player volume. |
Result: the media starts on the closest media player, within Config.maxDiscoveryDistance. Otherwise: “No media player nearby”.
Admin commands
/pmms_ctl acts on a player by its handle (network ID, or coordinate hash for a local entity). Its help and the list output are written to the server console, even when run from the game.
pmms_ctl list
pmms_ctl lock 123
pmms_ctl loop 123 on
pmms_ctl stop 123
123 is an example handle: read the real one in pmms_ctl list.
Settings remembered per player
These preferences are stored on the player’s machine (resource KVP):
| Key | Content |
|---|---|
baseVolume |
Personal volume (/pmms_vol), 0 to 100. |
showStatus |
Player status display (/pmms_status). |
tooltipsEnabled |
Panel tooltips. |
/pmms_fix resets the client-side player display without clearing these preferences.
Common mistakes
- “You must select from one of the pre-defined songs”: the player lacks
pmms.customUrland the argument is not a preset. - “You do not have permission to play the specified URL”: the URL matches no
Config.allowedUrlspattern and the player lackspmms.anyUrl. - “Vous avez déjà un média en cours…” (you already have a media playing):
Config.oneMediaPerPlayeris on and the media this player started is still playing. - “This player is busy”: the player is moving to the next queued item for another player.
- Unknown command after changing the prefix: update the
command.pmms…entries inpermissions.cfg.