[Tutorial] Fix Broken Lights And Sirens

I’m no developer but I think I’ve got the gist of it here:

Sometimes when you install a police car into FiveM you may notice an issue: Broken lights. There are different stages of severity: sometimes the lights won’t even turn on at all, and the siren won’t work. Sometimes the lights will turn on but they’ll be in weird positions, or it will just be a couple emissive in weird parts of the car. This is usually an issue of your siren ID. This unique ID is given to an emergency vehicle, but when another resource has the same siren ID, it will cause this issue. This happens more often than you would expect, and the solution is simply to change it.

Go to your carcol.meta and carvariations.meta files and open them both up. There you will find something that says “sirenSettings:” followed by a number (see photos). Change the number to a random six digit integer. Make sure the number is the same in both files. Save the file and upload it to your server, and restart. It may not work on the first try, but keep going at it. Change the number to something different and random each time, generally the higher the digits, the more success you will have. Eventually it will work, and then you have fixed your issue. Hope this works for you guys.

Photos:
Carcols.meta:
id1
Carvariations.meta:
id2

10 Likes

Basically every car I add to my server is broken and it takes like 20 minutes and a bunch of tries to fix it, you know of a way I could solve it?

2 Likes

Thank you so much, I payed money for a pack, and it wasn’t working. You just saved my from almost losing my money basically.

1 Like

Hey, reviving a dead tutorial! Jokes aside I don’t know if you are still on the site and gonna read this but to anyone out there who needs this info I’ll share it. I had the same problem. However, I found out from the Sirensetting limit adjuster mod on gta5mods where the author mentioned the 255 siren id limit for GTA 5. He noted that sirenid’s above 255 may cause conflicts with id’s that don’t even exist. Don’t ask I don’t know how. And after I changed all the vehicle’s siren id’s to be less than 255 and more than 13 (default gta) I can safely say that it worked! I have around 200 emergency vehicles and it fixed it all! Where before most was broken and I couldn’t fix not one in like 30 minutes. I hope that someone will remake the Sirensetting limit adjuster to work with fivem. Hope this helps.

5 Likes

Hey there. Haven’t been on the site for like 2 years but just got an email on this topic. I never knew that! Sounds like a great fix, and definitely makes sense. Wish I knew it when I was still developing. Have a good one sir!

1 Like

Logged on again after a while today, it actually works, that’s awesome! Thank you so much

2 Likes

we have so many leo vehicles… surely someone must know how to make the adjusted limit mod work in fivem? im kinda shocked nobody has? every single vehicle we add now is broken its such a pain (we have over 200 for sure)

Hi! As far as I’m aware it hasn’t been done by anyone. Unfortunately, you would have to change the siren ID’s one by one. I suggest making a sheet or something to track which cars use which ID. The siren ID limit is 255 and the first 13 or 14 is occupied by default GTA emergency vehicles. If you decide to do it then good luck and hopefully this helped!

EDIT: I have contacted the author of sirensetting limit adjuster on gta5-mods but he hasn’t gotten back to me in 7 months…

I should note that it doesnt seem to matter.
I’ve had broken lights before. Then I search every single sirensettings id on my server and its not conflicting with any others. Several times I’ve seen this. Theres something else going on with it. Its clearly conflicting, but the ID itself is unique. So it makes no sense unless everyone has it completely wrong about ID’s. Which is very possible knowing how shotty most devs are in FiveM with their vehicles. I honestly think it only ever uses the first 3 numbers sometimes and thats why. People doing numbers like 621978 or something it literally makes no difference. More numbers doesn’t always mean it will work. I’ve tried a number like 314 on a car that originally came with a number like 8523176 in it, and yet it still worked. But didn’t at first. Theres got to be a more solid solution than people just randomly typing numbers. I’ve completely ran out of luck with that to the point where its taking days to find one the works for a car. Every single time.

Its too bad that guy couldnt find a way to do it for FiveM. I’m honestly shocked as to how nobody has.

Yes, this is the exact problem. Because Rockstar’s limit on IDs is 255 higher numbers create conflicts that don’t exist. I had this problem where I tried from 30 to 473873737 and nothing worked… Until I took the time to redo the IDs and now 99% of what was broken is fixed and the 1% is prob. me screwing up something :grinning:.

Yea sounds like I’m going to have to do that and hopefully I dont have that many seperate light patterns. We have hundreds of LEO vehicles though.

One thing I noticed is a lot of vehicle packs have more than one siren ID in use per car when they dont even need it… they only need one for all of them to work in many cases but the dev’s dont know that so you end up wasting more carcols id options than you really have to for no reason. Including vehicle packs made by different people. They also often use the exact same light id for say a Tahoe.

1 Like

Just got an email about this topic. Glad to see my tutorial is still in circulation lmao

1 Like

Ok, since there seems to be a lot of confusion about this topic and I have a lot of experience with this, I’ll share my knowledge. This might get a bit technical, but I’ll try my best to make it as easy to understand as possible:

In the carcols.meta, all that is done is that the game is told that when the non-ELS lights of a car are activated, the emissives (called siren1, siren2 and so forth until siren 20) should be scaled up and down in a certain pattern with a certain speed. This means that if 2 cars have the same exact lighting setup, even if the cars themselves are completely different, they can use one siren ID if the lighting is done the same way (As is often the case in car packs for example). Now, this has to be the exact same lighting setup or lights will start breaking (seen ingame as emissives being out of place), but as long as the emissives are facing the same direction and are named the same, the size of the vehicle that they are on doesn’t matter in the slightest.
GTAV has a hard-coded limit of 255 siren IDs. Well, what about larger numbers then, you may ask: Basically, GTA performs an arithmetic operation called “modulo” on the number. This allows the game to turn any number over 255 into a number under 255. For example, the siren ID 1534 is in fact, to the game, the siren ID 4. I’ll refer to this siren ID that has been made into a number below 255 which is used by the game, as the “true” siren ID from here. Note that the modulo operation is performed ONLY on siren IDs over 255. This is important to remember.
This leads to siren ID collisions. A siren ID collision is when two carcols siren definitions use one true siren ID. Meaning that the same true siren ID is used to define two different ways of scaling emissives up and down. In the end, the game uses one of the definitions and scraps the rest. This is what then leads to a car having lights that are completely out of place.
This means, that in order for you to prevent lights from breaking on your server, you need to do the following:
— For ease of use: Change any siren ID to be below 255. This will make it easier for you to keep track of what siren IDs are being used, as the game won’t perform the modulo operation on them since they are under 255.
— Keep track of what siren IDs you use. This way, you shouldn’t have any collisions and broken lights. (Assuming that you don’t assign the same ID twice)
— Often times, a car pack really only needs maybe 1 or 2 siren IDs, but uses a different one for every single car when it comes from the developer. Just change this to where you only define it once, and just like that you have saved a bunch of IDs you can use for other cars.
— GTA uses siren IDs 1-13, so I recommend starting with siren ID 14 when you follow my advice and only use numbers below 255

I hope this helped to clear up the confusion around this topic.

3 Likes

Love when devs use a different sirenid for every car in their pack for no reason too.

But if this is the case why does every guide out there tell everyone to use such big sirenid’s rather than just telling them to make them under 255.

Interesting. But you are right. Eventually between 15-255 I will find a pattern that works for most vehicles. The multiple digits past 254 means nothing it would seem. Just a placebo effect.

Only reason I could see for them not working at all would be that you change the ID in the carcols.meta but not the carvariations.meta. I’m a dev for a server of approx. 45k members and we run with this system perfectly fine, not a single broken light.

With devs using a different ID for every car, often times they just don’t know that they could reuse the same ID for multiple cars

UPDATE: A MEGACHAD script creator who created the original SirenSetting Limit Adjuster for single-player has now reworked it and made it compatible with FiveM. Significant QoL changes were also made, such as an increased sirenid limit (from 20 to 32). https://www.lcpdfr.com/downloads/gta5mods/scripts/28560-sirensetting-limit-adjuster/

no f-ing way that sounds promising until I see

" FiveM Users

SSLA v2 is compatible with FiveM. The server owner must enable ASIs in server.cfg with sv_scripthookallowed true, and Each user must copy the ASI into the plugins folder in their FiveM Application Data. No changes are required to the server config."

Damn lol. Every single player on the server is going to have to copy the ASI into their game folder manually? How is that feasible? Damn

Yes, sadly every client had to install it manually. It’s very easy tho! Just download the .asi and put it in the plugins folder. There is no other way to do this unless FiveM implements this into its code (maybe).

Have you noticed that the log is showing sirenid’s / vehicles that you aren’t even running lol

One says admin_tank yet I have nothing called admin_tank on my server! lol

hello im having the same issue but my carcols file does not look like yours do i need to add this into the file ?