Simple Staged Lighting

JS_StagedLighting - Staged Lighting Script for FiveM

JS_StagedLighting is a simple script designed to manage the lights for staged vehicles that utilize extras for their different stages.

Installation and Configuration

  1. Add the script to your resources folder (Recommend in a sub folder like [Scripts]
  2. Either ensure [Scripts] or ensure SS_StagedLighting in your server.cfg
  3. Open config.lua and configure for your vehicle (refer to config section below for help).
  4. Enter the game and test. Default keybind is Numpad 2 (Clientside changeable, Default configurable)

Config

First we must declare the vehicle’s game name.
Only put the first 11 characters.
For some reason my method of finding the vehicle only looks at the first 11 characters of the game name.
So a game name like 08lapdcvpisecsd would be 08lapdcvpis to the script.

Next is repair, simple; Repair on cycle? This is for when the vehicle’s lights do not appear when the extras are toggled on. This is due to the lighting parts on the car having collisions, and parts with collisions only show after a repair.

Finally stages. You can have as many stages as you want, commonly 2-3. Each stage is shown by a number followed by the extras to change.
You only have to list the extras you want to toggle on or off; it is recommended to toggle off previous stage’s extras if the lights are not designed to combine into one.

Park pattern is present in the config but not implemented. SoonTM

Config.Vehicles = {
	-- State
    ["gamename"] = {
		Repair = true,
        Stages = {
            [1] = {
                 [2] = false
                ,[4] = false
                ,[3] = true
                ,[5] = true
            }, -- Stage 1: All extras off
            [2] = {
                 [2] = true
                ,[4] = false
                ,[3] = true
                ,[5] = true
            },  -- Stage 2: Extra 1 on, others off
            [3] = {
                 [2] = true
                ,[4] = true
                ,[3] = true
                ,[5] = true
            },   -- Stage 3: Extra 1 and 2 on, extra 3 off
            -- Add more stages as needed for this vehicle
        },
        ParkPattern = { -- NOT YET IMPLEMENTED
            [1] = true,
            [2] = false,
            [3] = true
        },  -- Park Pattern: Extra 1 and 3 on, extra 2 off
    },
}

Download

Future Plans

  • Park Pattern Support
  • Enhanced GUI elements
  • Integration into LuxartVehicleControl

Showcase Video

Known Problems

  • Sometimes, the stage will go above the max of a set vehicle (Commonly happens when going from a vehicle with more stages to a vehicle with fewer). Right now, a fix is to restart the script on occurrence.

License

SS_StagedLighting is released under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC-BY-NC-SA 4.0). This means you are free to use, modify, and distribute the script for non-commercial purposes as long as you provide proper attribution to the original creators. You must distribute your contributions under the same license terms if you remix, transform, or build upon the script.

Please note that this license doesn’t allow commercial use of the script. Additionally, the script is provided “as-is,” and the developers are not liable for any consequences arising from its use.

1 Like

do you have a showcase video for us?

Showcase please.

Just updated the post!

Updated it for that just a second ago.

1 Like

Are you using a custom visual pack or just settings ? My lights are looking dull and shieet.

I am using Natural Vision Evolved with ReShade.