VEHICLES
Vehicles

How to Add Non-ELS Lights to a FiveM Car

August 27, 2024 · 4 min read

Adding Non-ELS lights to a FiveM car enhances your server's realism and can significantly improve the players' experience. Whether you’re running an ESX, QBCore, or simply a standalone server, following the steps in this guide will help you integrate non-ELS lights seamlessly. Let’s dive into the practical steps for how to add Non-ELS lights to a FiveM car.

Understanding Non-ELS Lights

Non-ELS (Emergency Lighting System) lights are much simpler than their ELS counterparts. They work on a toggle system, allowing players to activate or deactivate lights without complex scripting. Knowing this distinction is essential for implementing them effectively. Non-ELS lights are commonly used for police vehicles, emergency services, and fire response vehicles.

Prerequisites for Adding Non-ELS Lights

Before you get started, ensure you have the following:

  • A FiveM server set up (preferably with access to server.cfg).
  • Basic knowledge of installing vehicle mods in FiveM.
  • A compatible vehicle model that supports non-ELS lights.

Step-by-Step Guide to Adding Non-ELS Lights

Adding Non-ELS lights involves several steps, including downloading the correct files and editing your configuration files. Below are the steps to guide you through the process:

1. Download the Non-ELS Light Pack

Make sure to find a reputable source for your Non-ELS light pack. Look for a package in the form of .ydt, .yft, and .ytd files, which are essential for integrating them into your vehicle.

2. Place the Files in Your Vehicle’s Folder

Once you have downloaded the Non-ELS lights files:

  • Open your FiveM resource folder located at resources/[local]/.
  • Create a new folder named after the vehicle you want to modify (e.g., police_vehicle).
  • Place the downloaded files into this newly created folder.

3. Edit fxmanifest.lua

Next, you need to configure the resource manifest:

  • Navigate to your vehicle folder and create a new file named fxmanifest.lua.
  • Use the following code to set up the manifest:
fx_version 'adamant'
game 'gta5'

files {
    'carvariations.meta',
    'handling.meta',
    'vehicles.meta',
    'vehiclelayouts.meta',
}

data_file 'CARCOLS_FILE' 'carcols.meta'
data_file 'VEHICLE_METADATA_FILE' 'vehicles.meta'
data_file 'VEHICLE_HANDLING_FILE' 'handling.meta'
data_file 'VEHICLE_LAYOUTS_FILE' 'vehiclelayouts.meta'

This code tells the server what files are being utilized for the vehicle.

4. Configure carcols.meta and vehicles.meta

You will also need to configure the carcols.meta and vehicles.meta files to define how the non-ELS lights behave:

  • In the same vehicle folder, create or modify the carcols.meta file. Add the lights configuration:
<carcols>
    <item>
        <name>lights</name>
        <colorList>
            <color value="0, 255, 0" />
            <color value="255, 0, 0" />
        </colorList>
    </item>
</carcols>
  • Similarly, update your vehicles.meta file to specify how your vehicle utilizes the Non-ELS lights. Ensure you set the lights in the proper section of the XML structure.

5. Modify server.cfg

You need to ensure your new resource is loaded when your server starts:

  • Open the server.cfg file located in your main server directory.
  • Add a line to start your car resource:
start police_vehicle

6. Test Your Vehicle

Now it’s time to test your changes:

  • Start your FiveM server and join it.
  • Spawn the modified vehicle and check if the Non-ELS lights function properly. Activate them with the designated keybind (usually L or another customizable key).

Troubleshooting Common Issues

Even with clear instructions, issues can arise. Here are some common problems and solutions:

1. Lights Do Not Appear

  • Check File Paths: Ensure all file paths in your fxmanifest.lua and other meta files are correct.
  • Server Restart: Make sure you restart the server after adding the files.

2. Server Crashes

  • Syntax Errors: Review your fxmanifest.lua, carcols.meta, and vehicles.meta for syntax errors. A missing tag can cause crashes.
  • Check Console: Look for error messages in the server console and address them accordingly.

3. Conflicts with ELS

  • If you have both ELS and Non-ELS lights in a vehicle, it could cause conflicts. Make sure your non-ELS configuration does not overlap with any ELS settings.

Conclusion

Adding Non-ELS lights to your FiveM cars is a straightforward process that greatly enhances your roleplay experience. By following these steps, you’ll be able to enjoy the full potential of your vehicle mods. Remember to check out the vehicles category for more mods and enhancements that can elevate your server further.

Frequently Asked Questions

Q1: Can I use Non-ELS lights on any vehicle?
A1: Yes, most vehicles can be configured to use Non-ELS lights, provided they have the appropriate meta files.

Q2: Do I need to know Lua scripting to add Non-ELS lights?
A2: Basic knowledge of Lua can help, but the steps outlined here do not require advanced scripting skills.

Q3: How can I customize the light colors?
A3: Modify the RGB values in the carcols.meta file to set your desired colors.

Q4: Will adding Non-ELS lights affect my server's performance?
A4: Generally, non-ELS lights have minimal impact on performance, especially compared to ELS.

Q5: What if my vehicle doesn’t support Non-ELS lights?
A5: You may need to edit the vehicle's base model or find an alternative mod that includes Non-ELS support.

#fivem#vehicles#non-els#lights#gta v

Keep reading