For the complete documentation index, see llms.txt. This page is also available as Markdown.

Business with jobs

Complex business with employees and more fun!

The biggest part of the update is of course a business with employees, customers, society management, minigame.. well let's just take a look!

How to?

First of all, make sure to read Simple Business section as it is a base for the complex business with jobs.

After completing what you read in Simple Business section, you should be left with a configured simple business. Let's now extend it to a fully working business.

From the Simple Business section, you should be left with something like this:

my_business = {
    enabled = true,
    businessName = "tattoobusiness",
    owner = "",
    bossMenu = {
        pos   = vector3(1862.2, 3748.2, 33),
        size  = vector3(1, 1, 1),
        color = {r=255, g=255, b=255, a=255},
        markerLabel = '💼'
    },
}

Now, we will add a job into it like this:

Config Structure

Looks complicated? Let's break it down!

  • enabled

    • true/falseif the job part should be enabled or not

  • label

    • only used in addon_account table in database

  • employeeMarkerLabel

    • Label to be shown at a place where employee enters the customers tattoo session

    • default is 🖌️, but you can use text and other emojis

  • customerAnim

    • sitting

      • animation of the customer being tattooed

      • pos= vector4 position where player will sit when being tattooed (x,y,z and heading)

      • animName= animation name

      • animDict= animation directory

      • animName and animDict should be left as default, but you can edit it if you want (animation list here)

  • employeeAnim

    • idle

      • animation of employee waiting for customer while they choose tattoo

      • pos= vector3 position where player should stand while idling (will automatically look at customer, no need for heading)

      • animName/animDict - same as in customerAnim

    • tattoo

      • animation of employee tattooing customer

      • pos not needed, used one from idle animation

      • animName/animDict - same as in customerAnim

  • grades

    • for now only boss grade is important as it is used for opening bossmenu etc. (another use may come in future update)

    • grade settings:

      • name= name of the job grade from database

      • isBoss = true/false if this grade should open bossmenu etc.

  • bossmenuOptions

    • If you have ESX, you can configure bossmenu options for each business so you can for example have one illegal business that can wash money

    • data structure:

      • withdraw = money withdrawal from bossmenu, default true

      • deposit = money deposit from bossmenu, default true

      • wash = washing money option in bossmenu, default false

      • employees = employee management option, default true

      • grades = grade management option, default true

QBCore jobs.lua

If you have qbcore, you also need to add the new job to jobs.lua, usually located in qb-core/shared/jobs.lua.

Make sure to also read notes below the code. The job in there will need to have same data as you have in config_business.lua and will look something like this (data are taken from config above):

❗ Few things to be careful about:

  • ['tattoobusiness'] = { - value in here is the businessName from config_business.lua

  • grades need to be in the same order as in config_business

  • grades need to have exact same names as in config_business.lua (lowercase/uppercase too)

  • isboss needs to be set for boss grade in jobs.lua

    • also notice that it is isBoss in our config_business, don't mix that up

\

🎉 If you did everything right, you should now have a working complex business! Now go make that moneeeey! 💰

Last updated