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 files are located in the config folder within the resource. This folder contains two subfolders:

  • _default.lock/ - Contains the default configuration files. Do not edit these files directly as they may be overwritten during updates.
  • custom/ - This is where you place your custom configuration files to override the defaults.

How to customize the configuration ​

  1. Navigate to jo_hairdresser_makeup/config/_default.lock/
  2. Copy the file you want to modify (e.g., prices.lua )
  3. Paste it into jo_hairdresser_makeup/config/custom/
  4. Edit the copied file in the custom folder

The script automatically loads files from custom/ first, and only uses _default.lock/ as a fallback. This system ensures your customizations are preserved when updating the script.

Default configuration files ​

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: