Seat permissions

The seat permission system allows you to define which seats in a vehicle have access to which features. This is essential for roleplay servers where, for example, a front passenger should be able to operate the siren but a rear passenger should not.


How It Works

Seat permissions are defined globally in shared/config.lua under Config.SeatPermissions. They apply to all vehicles - this is not a per-vehicle setting.

Each seat is identified by its seat index:

Seat Index
Position

-1

Driver

0

Front passenger

1

Rear left passenger

2

Rear right passenger

3+

Additional seats (buses, large vehicles)

circle-info

FiveM uses -1 for the driver seat and 0+ for passenger seats, counting from the front passenger.


Default Configuration

By default, only the driver and front passenger have permissions:

Config.SeatPermissions = {
    ["-1"] = {  -- DRIVER
        canUse = {
            sirene = true,
            sireneSwitch = true,
            lights = true,
            dualSiren = true,
            rumblerSiren = true
        }
    },
    ["0"] = {  -- FRONT PASSENGER
        canUse = {
            sirene = true,
            sireneSwitch = true,
            lights = true,
            dualSiren = true,
            rumblerSiren = true
        }
    }
}

Any seat not listed in the permissions table has no access to any control panel features. Players in those seats will see the UI but their button presses and keybinds will be ignored.


Available Permission Keys

Permission Key
Controls

sirene

Start / stop the main siren

sireneSwitch

Cycle siren tones up / down

lights

Toggle all lighting features (blue lights, traffic adviser, steady lights, beacon, etc.)

dualSiren

Toggle the dual siren (PowerCall)

rumblerSiren

Toggle the rumbler siren


Customization Examples

Only the driver can control everything

All other seats are excluded — passengers see the UI state but cannot interact.

Front passenger can only operate lights

Allow rear passengers to use sirens (e.g., command vehicles)


Important Notes

circle-exclamation
circle-exclamation
  • The control panel UI still appears for players in seats without permissions - they can see the current state of the vehicle's lights and sirens, but their input is ignored.

  • Passengers with the lights permission can toggle lights even when they are not the driver. The script handles synchronization via server events so the driver's client also reflects the change.

  • The sireneSwitch permission is separate from sirene - you can allow someone to start/stop the siren without being able to change the tone, or vice versa.


Passenger-to-Driver Sync

When a passenger toggles a light or siren (with the proper permissions), the action is synced through the server. If the passenger does not have network control of the vehicle (which is common - usually only the driver does), the script uses a proxy action system:

1

The passenger triggers a server event with the action.

2

The server validates the request and forwards it to the driver's client.

3

The driver's client executes the action locally and syncs to all players.

This ensures reliable sync even when the entity owner (driver) is a different player.


Last updated