boiidevelopment / boii-rgbcontroller-qb

FiveM Simple RGB Controller for QBCore
GNU General Public License v3.0
4 stars 1 forks source link

[Not a bug] just a suggestions for people regarding lights #3

Open kaneit opened 6 months ago

kaneit commented 6 months ago

if no-one has figured out how to only toggle neons.

this is how you do it. go to boii-rgbcontroller\client\rgbc_cl.lua

Replace the following

Line 91 - 136

--<!>-- CHANGE COLOURS --<!>--
RegisterNUICallback('ChangeColour', function(data)
    local args = tonumber(data.args)
    local player    = PlayerPedId()
    local vehicle = GetVehiclePedIsIn(player, false)
    if args == 1 then
        --SetVehicleHeadlightsColour(vehicle, 0) 
        SetVehicleNeonLightsColour(vehicle, 222, 222, 255)
    elseif args == 2 then
        --SetVehicleHeadlightsColour(vehicle, 1)
        SetVehicleNeonLightsColour(vehicle, 2, 21, 255)
    elseif args == 3 then
        --SetVehicleHeadlightsColour(vehicle, 2) 
        SetVehicleNeonLightsColour(vehicle, 3, 83, 255)
    elseif args == 4 then
        --SetVehicleHeadlightsColour(vehicle, 3)
        SetVehicleNeonLightsColour(vehicle, 0, 255, 140)
    elseif args == 5 then
        --SetVehicleHeadlightsColour(vehicle, 4)
        SetVehicleNeonLightsColour(vehicle, 94, 255, 1)
    elseif args == 6 then
        --SetVehicleHeadlightsColour(vehicle, 5)
        SetVehicleNeonLightsColour(vehicle, 255, 255, 0)
    elseif args == 7 then
        --SetVehicleHeadlightsColour(vehicle, 6)
        SetVehicleNeonLightsColour(vehicle, 255, 150, 0)
    elseif args == 8 then
        --SetVehicleHeadlightsColour(vehicle, 7)
        SetVehicleNeonLightsColour(vehicle, 255, 62, 0)
    elseif args == 9 then
        --SetVehicleHeadlightsColour(vehicle, 8)
        SetVehicleNeonLightsColour(vehicle, 255, 1, 1)
    elseif args == 10 then
        --SetVehicleHeadlightsColour(vehicle, 9)
        SetVehicleNeonLightsColour(vehicle, 255, 50, 100)
    elseif args == 11 then
        --SetVehicleHeadlightsColour(vehicle, 10)
        SetVehicleNeonLightsColour(vehicle, 255, 5, 190)
    elseif args == 12 then
        --SetVehicleHeadlightsColour(vehicle, 11)
        SetVehicleNeonLightsColour(vehicle, 35, 1, 255) 
    elseif args == 13 then
        --SetVehicleHeadlightsColour(vehicle, 12)
        SetVehicleNeonLightsColour(vehicle, 15, 3, 255)
    end
end)
Line 139 - 156
--<!>-- CHANGE COLOURS --<!>--
RegisterNUICallback('ChangeColour', function(data)
    local args = tonumber(data.args)
    local player    = PlayerPedId()
    local vehicle = GetVehiclePedIsIn(player, false)
    if args == 1 then
        --SetVehicleHeadlightsColour(vehicle, 0) 
        SetVehicleNeonLightsColour(vehicle, 222, 222, 255)
    elseif args == 2 then
        --SetVehicleHeadlightsColour(vehicle, 1)
        SetVehicleNeonLightsColour(vehicle, 2, 21, 255)
    elseif args == 3 then
        --SetVehicleHeadlightsColour(vehicle, 2) 
        SetVehicleNeonLightsColour(vehicle, 3, 83, 255)
    elseif args == 4 then
        --SetVehicleHeadlightsColour(vehicle, 3)
        SetVehicleNeonLightsColour(vehicle, 0, 255, 140)
    elseif args == 5 then
        --SetVehicleHeadlightsColour(vehicle, 4)
        SetVehicleNeonLightsColour(vehicle, 94, 255, 1)
    elseif args == 6 then
        --SetVehicleHeadlightsColour(vehicle, 5)
        SetVehicleNeonLightsColour(vehicle, 255, 255, 0)
    elseif args == 7 then
        --SetVehicleHeadlightsColour(vehicle, 6)
        SetVehicleNeonLightsColour(vehicle, 255, 150, 0)
    elseif args == 8 then
        --SetVehicleHeadlightsColour(vehicle, 7)
        SetVehicleNeonLightsColour(vehicle, 255, 62, 0)
    elseif args == 9 then
        --SetVehicleHeadlightsColour(vehicle, 8)
        SetVehicleNeonLightsColour(vehicle, 255, 1, 1)
    elseif args == 10 then
        --SetVehicleHeadlightsColour(vehicle, 9)
        SetVehicleNeonLightsColour(vehicle, 255, 50, 100)
    elseif args == 11 then
        --SetVehicleHeadlightsColour(vehicle, 10)
        SetVehicleNeonLightsColour(vehicle, 255, 5, 190)
    elseif args == 12 then
        --SetVehicleHeadlightsColour(vehicle, 11)
        SetVehicleNeonLightsColour(vehicle, 35, 1, 255) 
    elseif args == 13 then
        --SetVehicleHeadlightsColour(vehicle, 12)
        SetVehicleNeonLightsColour(vehicle, 15, 3, 255)
    end
end)