[ESX] MSK RGB Headlights

Changeable Vehicle Headlights with an Item

Description

An item opens a menu that allows you to change the color of the headlights.

In the Config many things are easily adjustable.


Config
Config = {}
----------------------------------------------------------------
Config.Locale = 'de'
Config.VersionChecker = true
Config.Debug = true
----------------------------------------------------------------
-- !!! This function is clientside AND serverside !!!
-- Look for type == 'client' and type == 'server'
Config.Notification = function(src, action, xPlayer, message)
    if action == 'client' then -- clientside
        MSK.Notification(message) -- replace this with your Notify
    elseif action == 'server' then -- serverside
        MSK.Notification(src, message) -- replace this with your Notify
    end
end
----------------------------------------------------------------
Config.Item = {name = 'headlights', label = 'Headlights'}
Config.removeItem = true -- Set to false if you dont want to remove the Item after use

Config.useNearVehicle = true -- Set to false if you dont want to use the item outside of the vehicle
Config.useInsideVehicle = true -- Set to false if you want to use the item inside of the vehicle
Config.Distance = 3.0 -- Only effects if Config.useNearVehicle = true

Config.Colors = {
    {name = 'default', label = 'Default', color = -1}, -- please don't edit the color in this line !!
    {name = 'xenon', label = 'Xenon', color = 'xenon'}, -- please don't edit the color in this line !!
    {name = 'white', label = 'White', color = 0},
    {name = 'blue', label = 'Blue', color = 1},
    {name = 'electric_blue', label = 'Electric_Blue', color = 2},
    {name = 'mint_green', label = 'Mint Green', color = 3},
    {name = 'lime_green', label = 'Lime Green', color = 4},
    {name = 'yellow', label = 'Yellow', color = 5},
    {name = 'gold', label = 'Gold', color = 6},
    {name = 'orange', label = 'Orange', color = 7},
    {name = 'red', label = 'Red', color = 8},
    {name = 'pony_pink', label = 'Pony Pink', color = 9},
    {name = 'hot_pink', label = 'Hot Pink', color = 10},
    {name = 'purple', label = 'Purple', color = 11},
    {name = 'blacklight', label = 'Blacklight', color = 12},
}

Download

Link

Code is accessible Yes
Subscription-based No
Lines (approximately) 300
Requirements es_extended, NativeUI, oxmysql, msk_core
Support Yes

My other Scripts

Paid

Free

5 Likes

Can you add a preview? :slight_smile:
Cool script btw :+1:

We can do that :slight_smile:
You just have to use the item inside or outside the car and then you have to select a color inside the menu

1 Like

Hi there, can you please upload any picture of the script?
Would like to see.

Hey, here you can see a preview: Streamable

Hey, here you can see a preview: Streamable

PREVIEW