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) |
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 not see the UI.
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
Config.SeatPermissions = {
["-1"] = {
canUse = {
sirene = true,
sireneSwitch = true,
lights = true,
dualSiren = true,
rumblerSiren = true
}
}
}
All other seats are excluded - passengers see the UI state but cannot interact.
Front passenger can only operate lights
Config.SeatPermissions = {
["-1"] = {
canUse = {
sirene = true,
sireneSwitch = true,
lights = true,
dualSiren = true,
rumblerSiren = true
}
},
["0"] = {
canUse = {
sirene = false,
sireneSwitch = false,
lights = true,
dualSiren = false,
rumblerSiren = false
}
}
}
Allow rear passengers to use sirens (e.g., command vehicles)
Config.SeatPermissions = {
["-1"] = {
canUse = {
sirene = true,
sireneSwitch = true,
lights = true,
dualSiren = true,
rumblerSiren = true
}
},
["0"] = {
canUse = {
sirene = true,
sireneSwitch = true,
lights = true,
dualSiren = true,
rumblerSiren = true
}
},
["1"] = { -- REAR LEFT
canUse = {
sirene = true,
sireneSwitch = true,
lights = false,
dualSiren = false,
rumblerSiren = false
}
},
["2"] = { -- REAR RIGHT
canUse = {
sirene = true,
sireneSwitch = true,
lights = false,
dualSiren = false,
rumblerSiren = false
}
}
}
Important Notes
Seat permissions are global, not per-vehicle. The same permission structure applies to every vehicle managed by the control panel. If you need different permissions for different vehicle types, this would require custom code modifications.
Seat permissions cannot be toggled per player. Unlike the Config.Settings options, seat permissions are a server-wide configuration that applies to all players equally.
- Passengers with the
lightspermission 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
sireneSwitchpermission is separate fromsirene- 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.