Skip to content

Using Custom HUD Colors

Hannele Ruiz edited this page Jan 2, 2021 · 1 revision

PlayerCompanion allows you to set custom HUD colors for addon peds. The color of the ped can be changed during runtime by other scripts as they see fit.

Adding new Ped Colors is pretty easy, you just need to get a couple of values and place them into Colors.json in the PlayerCompanion folder.

Getting the Model Name or Hash

The first step is getting the Name or Hash of the Ped Model that you plan to use. You can get the name by navigating to the model of the ped with the ydd extension and getting the name from it (for example, if your ped is called myped.ydd then your name is myped).

For this example, we will use miku as the model name.

Getting the RGB Color Values

Now, we need to get the colors that we desire to use on the HUD for the Ped. There are a couple of different ways that you can use to get the appropiate color:

  • Use Photoshop or any other photo editing tool to get a color from the Ped textures
  • Use any color picker to manually select a color (PS: you can use the Color Picker from Google)
  • Search on Google for a color that can be used for your character (sometimes you will find official colors from game developer and animations for cosplay)

For this example, we will use R: 25, G: 223, B: 211.

Adding the Color to PlayerCompanion

We now have everything that we need to add the Color to PlayerCompanion.

Let's start by opening the file called Colors.json in the scripts\PlayerCompanion directory (if is not there, run the game at least once with PlayerCompanion). You will see something like:

{}

In there, you need to create a JSON key/value pair, with the Model or Hash as the key, and an object as the value with the RGB values, like this:

{
    "miku": {
        "r": 25,
        "g": 223,
        "b": 211
    }
}

If you want to add more Ped colors, just add a coma after the end of the Object and add a key/value pair under the coma, like this:

{
    "miku": {
        "r": 25,
        "g": 223,
        "b": 211
    },
    "llenn": {
        "r": 238,
        "g": 121,
        "b": 156
    }
}