Locksmith Example
We'll use the pre-configured locksmith job as a template and explain what each property does. V
You can find everything in [rcore_doorlock]/rcore_doorlock/config.business.lua
.
Name and framework job
For a business to works properly, the configuration needs to be correct. The category name needs to match the name
entry, as you can see below. It does not have to be the job name. To link the business to a job from your framework (ESX/QBCore/...), specify the correct job name in job
.
Crafting
Let's take a look at the crafting board setup. Everything is located in money
section. We can set up key or card crafting. Let's demonstrate this on the key crafting.
The item
property is passed from the main config, we don't need to touch it.Next we see the key label in the crafting menu. This is displayed when we select what we want to craft. The enabled
property tells us if we want to let players in this business craft key.
💼 This gives us the ability to have multiple businesses, where one will handle the key door and the other the card reader door and card item production.
Another important thing is the price. The price
is quoted per item crafted for door. However, if we want to produce a key/card for a whole group of doors, we can use a price modifier (multiplier).
We can decide if the price for crafting will come out of the player's pocket, or out of the framework job society's money. If we set enabled
to false, the money will be taken from the player's account defined in playerAccount
. For ESX, this can be money
for cash, or bank
for a bank account, for example.
Locations
We must also set locations where the crafting table and NPC with boss actions will be placed.
We don't have to touch the type of location. This is in case we want to have several locations. In addition to the coordinates, we can also set a blip that will be displayed to players in the business on the map.
Grades
Another important configuration are business grades. We need to set grades to match exactly the job one from your framework. It is important to set the grade
and name
correctly, which for each grad must match the one in the framework job. If everything matches the framework job, we can move on.
The boss grade must be marked with the boss = true
property so that the business can know who has access to the boss actions.
Each grade has configurable permissions of what they can do. If we want rookie grade to only be able to craft keys/cards, we set permission to craft. If we want experienced grade to be able to create door locks, we set the appropriate permission for it as well.
Last updated