Colored Headlights 1.0.0

   (7 reviews)
Sign in to follow this  

1 Screenshot

About This File

RHnzQVP.jpg

This script adds the colored xenon headlights feature from Arena War DLC.

 

Installing

Put coloredhlights into your server's client_packages directory, then add require('coloredhlights'); to client_packages/index.js.

 

Using

Set the headlightColor shared variable of a vehicle to the headlight color ID you want. Command example:

// /hcolor 10 should make your vehicle's headlights pink
mp.events.addCommand("hcolor", (player, _, colorId) => {
    if (player.vehicle) {
        player.vehicle.data.headlightColor = Number(colorId);
    } else {
        player.outputChatBox("You're not in a vehicle!");
    }
});

 

Headlight Colors

Since Rockstar didn't make headlight colors RGB, you can only use a set of numbers as color IDs.

0 = White
1 = Blue
2 = Light Blue
3 = Green
4 = Light Green
5 = Light Yellow
6 = Yellow
7 = Orange
8 = Red
9 = Light Pink
10 = Pink
11 = Purple
12 = Light Purple

Color IDs higher than 12 will force xenon headlights to use their default color.

 

Notes

  • Since this script toggles the xenon headlights mod (toggleMod 22), it may not work with your car customization script.
  • Color IDs lower than 0 and color ID 255 will disable the feature (revert headlights back to normal from xenon) until you set a valid color again.
  • Like 10



User Feedback

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest

Gonzi

  

OMG thanks a lot

Share this review


Link to review
MyNameIsJeff

· Edited by MyNameIsJeff

  

Awesome work & thank you!

I've made an extra snippet in case you want to include a prompt once the player is in the vehicle and doesn't define the color ID:

Include BEFORE activating the function headlightColor:

    if (player.vehicle && _ == undefined){      // If the player is in the vehicle and no color number is defined
        player.outputChatBox(`/hcolor [1-12]`); // Output the correct command format
    }

 

Share this review


Link to review
MrCarter

· Edited by MrCarter

   0 of 3 members found this review helpful 0 / 3 members

Stolen from rgnbgnhnd, I love it

Share this review


Link to review
hubba

  

awesom

Share this review


Link to review
Jaimuzu

   4 of 5 members found this review helpful 4 / 5 members

👀👌👀👌👀👌👀👌👀 good decompile go౦ԁ dEcompIle👌 thats ✔ some good👌👌decompile right👌👌there👌👌👌 right✔there ✔✔if i do ƽaү so my self 💯 i say so 💯 thats what im talking about right there right there (chorus: ʳᶦᵍʰᵗ ᵗʰᵉʳᵉ) mMMMMᎷМ💯 👌👌 👌НO0ОଠOOOOOОଠଠOoooᵒᵒᵒᵒᵒᵒᵒᵒᵒ👌 👌👌 👌 💯 👌 👀 👀 👀 👌👌Good decompile

 

Epic root u really are an beast 

  • Like 2

Share this review


Link to review
ynhhoJ

  

Wow, very useful! 

Share this review


Link to review