Skip to content

💄 Makeup

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

1. Installation

WARNING

The Hairdresser script is required to use this add-on.

To install jo_hairdresser_makeup:

  • Drag and drop the resource into your resources folder
    • jo_hairdresser_makeup
  • Add this ensure to your server.cfg after ensure jo_hairdresser
    • ensure jo_hairdresser_makeup

Congratulations, the Makeup add-on is ready to use!

2. Usage

3. Configuration

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

  1. Open /overwriteConfig.lua
  2. Find the value you want to change in config.lua (e.g., Config.language )
  3. Copy only that line into overwriteConfig.lua
  4. 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.

Loading configuration...

4. For developers

Actions

Actions are one of the two types of Hooks. They provide a way to run a function at a specific point in the execution of scripts. Callback functions for an Action do not return anything back to the calling Action hook. They are the counterpart to Filters.

Below is the available action in the jo_hairdresser_makeup script.

Client Init

Triggered when the add-on links to jo_hairdresser and registers its Hairdresser menu entries.

lua
exports.jo_hairdresser_makeup:registerAction('init', function()
    -- Your code here
end)

Filters

Filters allow you to modify data or permissions synchronously at specific points in the script. Below is the complete list of jo_hairdresser_makeup filters and how to use them.

Client Can open makeup menu

Control whether the Makeup entry is added to the Hairdresser menu.

lua
-- @param canOpen - boolean (default true)
exports.jo_hairdresser_makeup:registerFilter('canOpenMakeupMenu', function(canOpen)
	return canOpen
end)

Client Can open lifestyle menu

Control whether the Lifestyle entry is added to the Hairdresser menu.

lua
-- @param canOpen - boolean (default true)
exports.jo_hairdresser_makeup:registerFilter('canOpenLifestyleMenu', function(canOpen)
	return canOpen
end)

Server Can buy

Control whether the purchase can continue before money is charged.

lua
-- @param canBuy - boolean (default true)
-- @param source - serverID of the player
-- @param currentData - table: purchase data
-- @param moneyType - any: selected money type/payment context
exports.jo_hairdresser_makeup:registerFilter('canBuy', function(canBuy, source, currentData, moneyType)
	return canBuy
end)

Last updated: