โ๏ธ 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_hairdresserensure 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 โ
The configuration file is config.lua in the resource root. Do not edit this file directly as your changes may be lost during updates. Instead, use overwriteConfig.lua to store your customizations.
config.lua- Default configuration maintained by developers. Do not modify this file.overwriteConfig.lua- This is where you place only the values you want to override.
How to customize the configuration โ
- Open
/overwriteConfig.lua - Find the value you want to change in
config.lua(e.g.,Config.language) - Copy only that line into
overwriteConfig.lua - Edit the copied value to your liking
The script loads config.lua first, then overwriteConfig.lua overwrites only the values you redefine. This ensures your customizations are preserved when updating the script.
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:
-- @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
-- @param canUse - boolean
exports.kd_hairdresser_coloring:registerFilter('canOpenColorPalette', function(canUse)
return canUse
end)