Skip to content

✂️ Hair & beard coloring

Documentation relating to the kd_haidresser_coloring add-on for Hairdresser script.

1. Installation

WARNING

Hairdresser script is required to use this add-on

To install kd_hairdresser_coloring:

  • Drag and drop the resource into your resources folder
    • kd_hairdresser_coloring
  • Add this ensure in your server.cfg after ensure kd_hairdresser
    • ensure kd_hairdresser_coloring

Congratulation, the Hair & Beard coloring add-on is ready to be used!

2. Usage

Go into the hairdresser to dye or hair/beard.

3. Config.lua file

Config.lua
lua
Config = {}

Config.keys = {
  coloring = 'INPUT_CREATOR_RS'
}

Config.palettes = {
	hair = {
		tint_generic_clean = true,
		tint_hair = true,
		tint_horse = true,
		tint_horse_leather = true,
		tint_leather = true,
		tint_makeup = true
	},
	beard = {
		tint_generic_clean = true,
		tint_hair = true,
		tint_horse = true,
		tint_horse_leather = true,
		tint_leather = true,
		tint_makeup = true
	},
	hair_accessories = {
		tint_generic_clean = true,
		tint_hair = true,
		tint_horse = true,
		tint_horse_leather = true,
		tint_leather = true,
		tint_makeup = true
	},
}

4. For developers

Filters are the new way to modify data used by the script. These filters are fired at a specific point in time during the execution of the script. But contrary to events, filters are synchronous.

  • Syntax:
lua
-- @param <actionName> - name of the action
-- @param <argumentList> - list of arguments which are passed
exports.kd_hairdresser_coloring:registerFilter(<actionName>, function(variable)
  -- Add your new data here
	return variable -- Don't forget to return the value
end)

Client Restrict the coloring

Fires after completed the coloring prompt

lua
-- @param canUse - boolean
exports.kd_hairdresser_coloring:registerFilter('canOpenColorPalette', function(canUse)
	return canUse
end)

Last updated: