Fixing police lights in the wrong place

Fix emergency lights that float beside the car or flash wrong in FiveM: give the vehicle a unique siren ID and clear the cache.

Updated
On this page

If the emergency lights on a police car, ambulance or fire truck flash in the air beside the car, in the wrong place, in the wrong colours, or not at all, the vehicle is usually reading the wrong siren settings. Here is how to find and fix the cause.

How the lights are set up

Every emergency vehicle has a siren ID. The light patterns and colours are stored under that ID in carcols.meta, and the vehicle points at it from carvariations.meta:

xml
<!-- carcols.meta -->
<Sirens>
  <Item>
    <id value="4577" />
    <name>police3_lights</name>
    ...
  </Item>
</Sirens>
xml
<!-- carvariations.meta -->
<sirenSettings value="4577" />

Siren IDs are shared by everything on the server. If two vehicles from different resources use the same ID, only one set of settings is loaded, and the other vehicle flashes its lights with a pattern built for a different car. That is why the lights seem to float off the body.

Fix 1: Give the vehicle its own siren ID

  1. Open the vehicle's data folder.
  2. In carvariations.meta, find the entry with your vehicle's <modelName> and note the number in <sirenSettings value="..." />.
  3. In carcols.meta, find the <id value="..." /> with that same number under <Sirens>.
  4. Change both to a new number that no other vehicle on your server uses. The two numbers must match.
  5. Restart the server.

If you have several vehicles in one pack sharing a lightbar, they can share an ID on purpose. Only vehicles from different packs, or with different light layouts, need their own.

Fix 2: Clear the cache

Sometimes the ID is unique but old files are still being used. Clear the server cache:

  1. Stop the server.
  2. Open the server's cache folder (in the same folder as resources).
  3. Delete everything inside cache.
  4. Start the server.

If it's still wrong for one player only, the cache is on their side. Close FiveM, open %localappdata%\FiveM\FiveM.app\data and delete the cache, server-cache and server-cache-priv folders. Don't delete game-storage, or FiveM has to download the game files again.

Other causes

  • The meta files aren't loaded. The vehicle's fxmanifest.lua needs a data_file line for each file. Without them, the car uses default lights or none:
lua
data_file 'VEHICLE_METADATA_FILE' 'data/vehicles.meta'
data_file 'CARCOLS_FILE' 'data/carcols.meta'
data_file 'VEHICLE_VARIATION_FILE' 'data/carvariations.meta'
  • A lights script overrides them. ELS-style scripts and some siren scripts control the lights themselves. If the pack is meant for one, set it up there. If it isn't, check the script isn't also listing that vehicle.
  • The XML is broken. One missing tag stops the whole carcols.meta from loading, so every vehicle in it loses its lights. Check the server console when the resource starts.
  • The vehicle spawned before your change. Delete it and spawn it again after the restart.

Still stuck?Ask on our Discord