rcore.cz
  • rcore.cz
  • Store
  • Discord
  • Web administration
  • Our store
  • YouTube
  • 🐌CFX Auth system
    • CFX Auth system
    • Transfer script to another account
    • Error: You lack the required entitlement
    • Error: syntax error near '<\1>'
  • Server
    • Updating server
    • onesync
  • Administration
    • How to change IP
    • Forgot your password?
  • FAQ
    • General issues
    • Cannot verify license
    • Cannot hear any music
    • ECONNRESET: Unable to execute a query
  • paid resources
    • 🏑rcore_airhockey
      • How To Play
      • Spawning a Hockey Table
    • 💪rcore_armwrestling
      • How to place arm table
    • 🎴rcore_banners
      • How to Begin
      • How to Update
      • Common issues & solutions
      • Installation
      • Inventory Items
      • Configs
        • General
        • Billboards
        • Business
        • Permissions
        • Job
        • Config
      • Guides
        • How to change UI logo?
        • How to create new server banner?
        • How to create business?
        • How to buy billboard?
        • How to place banner?
        • Cannot see banners?
        • Expired images
      • API
    • 🏀rcore_basketball
      • Configure new hoop
    • 🏓rcore_beerpong
      • How to use
    • 📹rcore_bodycam
      • Integration
      • Anticheat
      • Recordings don't save
    • 🎳rcore_bowling
      • Configure new alley
    • 🎥rcore_cam
      • Integration
      • Anticheat
    • ⛺rcore_camping
      • Installation
      • Config
      • Consumable Beer
      • OX Inventory
      • Frameworks
      • API
    • 🎪rcore_carnival
      • Create new minigame
    • 🃏rcore_casino
      • Installing Maps
        • UncleJust Casino
        • DlcIplLoader
        • Gabz Casino
        • NoPixel Casino
        • K4MB1 Casino
        • rcore_casino_interior
        • Underground Casino Paleto
        • K4MB1 Enterable Diamond Casino
        • Patoche Casino
        • Clawles: Casino Los Santos
        • Molo Casino
        • Jurassic Jackpot Casino
      • Standalone Version
      • Custom Framework
      • Installing on QBCore
      • Installing on ESX
      • Installing Inventory Items
      • The Cashier
      • Society
      • Lucky Wheel & Podium Vehicle
      • Table Games
      • Slot Machines
      • Casino Bar
      • Inside Track
      • Translations
      • Discord Hook
      • MYSQL Info
      • CasinoControl (Exports)
      • Casino Job & Office
      • Changing Odds
    • 👕rcore_clothes
      • Dark theme
      • Adding a new clothes shop
      • Components
      • Restriction for certian job
      • Custom clothes price
      • Clothes blacklist / Whitelist
      • esx_accessories
      • qb_apartments
      • cui_character
      • API: Open outfits
      • API: Open clothes shop
    • 🎽rcore_clothing 🆕
      • How to begin
      • Installation
      • Migration
      • Configs
        • Main config
        • Price config
        • Shop config
        • Peds config
        • Undress clothes
      • FAQ
      • Admin mode
        • Modes
        • Image debugging
        • Stock management
      • Adding replace/addon clothes
      • Categorize clothing automatically
      • API
      • Troubleshooting
      • Integration
        • Multichar integration guide
        • esx_multicharacter
        • esx_multicharacter OLD
        • qb-multicharacter
        • crm_multichar
        • codem_multichar
        • okok_multichar
        • qbox_multichar
        • ESX vms_multichar
        • QB vms_multichar
        • qs-multicharacter
        • um_multichar
        • wais_multicharacter v2
        • zr_multichar
        • zsx_multicharacter
    • 💃rcore_dance
      • Installation
      • Config
      • FAQ
      • Troubleshooting
      • API
    • 📱rcore_dispatch
      • Config
      • Add alerts
      • Add jobs
      • Locales
      • Logs
      • Integrations
      • Framework
      • Voice and radio
    • 🔒rcore_doorlock
      • Installation
      • Configuration
      • Migration
      • Business
        • Configuration
        • Locksmith Example
      • Inventory Items
      • Keychain
      • API
    • 🍺rcore_drunk
      • How to place drink on table
      • Create new item drink
      • ox inventory
      • API
      • How to use
    • 🥚rcore_easter
      • Installation
      • Configuration
      • API
    • ⛽rcore_fuel
      • Installation
        • ESX
        • QBCore
      • Inventory
        • ESX
        • QBCore
        • ox_inventory
      • Config
        • New fuel station
        • Change fuel type for vehicle
        • Change fuel capacity for vehicle
        • Setting fuel station to be ownable
        • Wrong fuel type
        • Change gas price
      • Integrations
        • API
        • Vehicle keys integrations
        • Hud/Garage integration
      • Server
        • Commands
    • 🔫rcore_gangs
      • API
        • Client
        • Server
      • Integration
        • Framework
        • Inventory
        • Dispatch
      • Localization
      • Configuration
        • Custom gang zone
    • 🚙rcore_garage
      • qb-phone missing garages name
      • missing screenshots
    • 📙rcore_guidebook
      • Installation
      • Config
      • Data permissions
      • API
      • Themes
      • 📙V1 Docs
        • Installation
        • API
        • Themes
    • 🔫rcore_gunshop
      • QBCore Installation
      • ESX Installation
      • How to change pricing
      • How to enable sales of weapons
      • Enabling MK2 weapons on QBCore
      • Adding the ammunation job for QBCore
      • Adding the ammunation job for ESX
    • 🎯rcore_gunrange
      • Installation
      • API
      • Troubleshooting
      • Frequently Asked Questions
      • Gun Range Editor
    • 🏨rcore_hotel
      • How to add another hotel example
      • esx_inventoryhud
      • Quasar inventory
      • OX inventory
      • MF inventory
      • Custom wardrobe
    • 🧑rcore_identity
      • How to change date format
      • esx_kasharacter
    • 🟠rcore_job_blips
      • Installation
      • Configuration
      • Blip Setup
      • Group Setup
      • API
    • ⛳rcore_minigolf
      • Builder
      • Company
      • Config
    • 🚛rcore_missionpack_legal
      • Migrate from old version
    • 🚗rcore_pdm
      • Missing images
      • Blips on minimap
      • Vehicles in stock
      • Missing vehicle names
      • Edit the speed of the vehicle in UI
      • Boss menu + locations
      • Displayed vehicle in the shop
      • How to add a vehicle with a new category
      • QBCore
        • Import missing vehicles from qbcore to rcore_pdm
        • Job data for QBCore framework
        • Import vehicles from database to qbcore
    • 🏓rcore_pingpong
      • How To Play
      • Spawning a Pong Table
      • Match Settings
    • 🤽‍♀️rcore_pool
      • Anticheat
      • How to place pool table
    • 👮rcore_police
      • Installation
      • How to Update
      • Features
      • Inventory
      • Deployer
      • Configs
        • Main Config
      • API
        • Client
        • Server
    • ⛓️rcore_prison
      • Migration from V1
      • How to Begin
      • How to Update
      • Installation
      • Inventory items
      • Configs
        • Main Config
      • Guides
        • Deployer
        • Changing minigame for Cigarette packaging
        • Changing Prison jobs reward
        • Configuring Permissions
        • How to translate in-game panel
        • How to define own stats for Prison GYM?
        • How to define/change default Prisoner outfits?
        • How to define own Prison map?
      • Features
        • Prison Break
        • Solitary
        • Cigar packaging
        • Canteen
        • Dealer
        • Dashboard
        • Chair system
        • Prison Prolog
      • Integrations
        • Inventory
        • Inventory items
      • API
        • Client
        • Server
      • ⛓️V1 Docs
        • Config
        • Inventory
        • API
          • Client
          • Server
        • Locales system
        • Interiors presets
        • Camera prolog
        • Outfits
    • 📻rcore_radiocar
      • API
        • Radio item
        • Marker for buying radio
    • 📋rcore_report
      • Installation
      • API
      • Ace Permissions
      • Config
      • UI Config
      • Features
      • Console Logs
      • Custom Data
      • Responsivity
    • 🏪rcore_shops
      • Add new shop
      • How to add weapon
      • Hide blip on minimap / map
      • Restrict shop to certain job
    • 🔠rcore_shortcuts
      • API
      • Commands and Hotkeys
      • Permissions
      • Notifications
      • Limits
      • Styles
    • ✨rcore_spray
      • ESX instalation
      • QBCore instalation
      • OX Inventory instalation
      • How to add a new image
      • How to add a new font
      • Gang integration
      • Anticheat
    • 📈rcore_stats
      • Installation
      • Permissions
      • Configs
        • Main config
        • Performance
        • Units
        • Other
      • Translation
      • Changing Default Values
      • API
        • Integration
        • Delete
        • Other
    • 👹rcore_tattoos
      • Installation
      • Migrations
      • Add-on tattoos
      • Config
      • Custom Framework
      • Design
      • Tattoo config options
      • Tattoo permissions
      • Troubleshooting
      • API
      • Integrations
        • qb-gangs
      • Business update
        • Config
        • Simple Business
        • Business with jobs
        • Default settings
    • 📺rcore_television
      • How to add a new television
    • 🔧rcore_tuning
      • Editing your config
      • Configuring your framework
      • Job integration
      • Item integration
      • Editing tuning prices
    • 📋rcore_whiteboard
      • Whiteboard type & data
      • Position editor
      • API
      • FAQ
    • 🎁rcore_xmas
      • Installation
      • Configuration
      • Inventory Items
      • Snowball Damage
      • API
    • 📻xradio
      • API
      • Custom menu
      • Ox inventory
  • free resources
    • rcore_arcade
      • How to add msdos games
Powered by GitBook
On this page
  • Name and framework job
  • Crafting
  • Locations
  • Grades

Was this helpful?

  1. paid resources
  2. rcore_doorlock
  3. Business

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.

locksmith = { --            ⬇️ Needs to match 
    name = 'locksmith',  -- ⬆️Needs to match 
    label = 'Locksmith', 
    job = 'locksmith', 

    ...

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.

money = {
    key = { 
        item = Config.DoorSystem.Items.Key.Item, -- Item for key
        label = 'Key',
        enabled = true,                          -- Enable or disable crafting key
        price = 100,                             -- Price for crafting key
        groupModifier = 1.5,                     -- Increase price by x1.5 for group keys for all doors
        society = {
            enabled = true,                      -- Enable or disable society, if false, money will be taken from player account
            name = 'society_locksmith',
        },
        playerAccount = 'money' -- If society is disabled, money will be taken from this account
    },

    ...

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.

locations = {                                                   -- Locations for business
    {
        type = Business.Locations.CRAFTING_TABLE,               -- Location type [CRAFTING_TABLE, BOSS_ACTIONS]
        coords = vector4(162.2114, -1810.1307, 28.7273, 230.0), -- Location coords
        blip = {                                                -- Blip settings
            label = 'Locksmith Crafting Table',
            sprite = 763,
            color = 5,
            scale = 1.0,
            isShortRange = true,
            display = 2,
        },
    },

    ...

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.

grades = {                -- Grades for business (need to be same as in your framework jobs)
    {
        grade = 0,        -- Grade number
        name = 'rookie',  -- Grade name
        label = 'Rookie', -- Grade label
        permissions = {   -- Permissions for grade
            [Business.Permissions.CRAFT_ITEM] = true,
            --[Business.Permissions.CREATE_DOOR] = true,
            },
    },

    ...

    {
        grade = 3,
        boss = true, -- Is boss grade
        name = 'boss',
        label = 'Owner',
        permissions = {
            [Business.Permissions.CREATE_DOOR] = true,
            [Business.Permissions.CRAFT_ITEM] = true,
            [Business.Permissions.EDIT_DOOR] = true,
            [Business.Permissions.DELETE_DOOR] = true,
            [Business.Permissions.CHANGE_LOCKS] = true,
        },
    }
PreviousConfigurationNextInventory Items

Last updated 8 months ago

Was this helpful?

🔒