Skip to content
ZDP Scripts
GitHub Discord

๐Ÿ’ผ zdp-masterjob

ZDP-Masterjob

An advanced job system for FiveM that allows players to participate in various work activities with a leveling system, vehicles, work points, and more.

Permissions

To create new jobs in-game, the player must have the appropriate ACE permission configured in their server.cfg. Add the following line, replacing xxxxxx with the playerโ€™s identifier:

add_ace identifier.fivem:xxxxxx "create_jobs" allow

Requirements

  • oxmysql
  • ox_lib
  • ox_inventory (Recommended)
  • ox_target (Recommended)

Installation

  1. Download the latest version of the resource
  2. Place the ZDP-Masterjob folder in your resources directory
  3. Ensure all required resources are installed
  4. Import the provided sql_your_framework.sql file to your database
  5. Configure the config.lua file according to your needs
  6. Add ensure ZDP-Masterjob to your server.cfg
  7. Add your permissions in your server.cfg with add_ace identifier.fivem:xxxxxx "create_jobs" allow

Configuration

The main configuration file is located at config.lua. Here you can customize:

Basic configuration

Config.Command = "openBusiness" -- Command to open the interface
Config.CommandAdminPanel = "adminPanel" -- Command to open the admin interface
Config.OpenInterfaceKey = "INSERT" -- Key to open the interface

Config.UsingOxTarget = true -- Enable ox_target

Config.MaxSalary = 2500 -- Maximum salary for jobs
Config.BossGradeDefaultName = 'Boss' -- Default boss grade name
Config.CreateJobCommand = 'createJob' -- Command to create jobs
Config.TimePickupOrder = 20 -- Time to pickup an order in minutes

Config.Framework = "qbx_core" -- qbcore or qbx_core
Config.Inventory = "ox_inventory" -- qb-inventory or ox_inventory
Config.Language = "en" -- Language

Available job types

Config.Types = {
    badu = "badu",
    mechanic = "mechanic",
    ammu = "ammu",
    restaurant = "restaurant"
}

Level system

The script includes a complete level system that unlocks different functionalities:

  • Item points: Unlocks new products to sell
  • Garage: More parking spaces per level
  • Inventory: Greater storage capacity
  • Salesman: Limit of items for sale
  • Wardrobe: Access to work uniforms
  • Cash register: Billing system

Employee limit per level

Config.UsingLimitEmployees = true -- Limit employees per level
Config.LimitEmployeesLevels = {
    ['badu'] = {
        { levelRequired = 1, maxEmployees = 3 },
        { levelRequired = 2, maxEmployees = 6 },
        { levelRequired = 3, maxEmployees = 9 }
        -- ... more levels
    }
    -- ... other job types
}

ox_target Integration

To enable ox_target compatibility, set Config.UsingOxTarget = true in the configuration file.

Config.UsingOxTarget = true -- Enable/disable ox_target usage

Exports

Job Management

-- Check if a job is currently opened
local isOpened = exports['ZDP-Masterjob']:getIsJobOpened(jobName)
-- Returns: boolean or false if job doesn't exist

-- Set a job's opened/closed status
exports['ZDP-Masterjob']:setJobOpened(jobName, opened)
-- jobName: string - Name of the job
-- opened: boolean - true to open, false to close
-- Returns: boolean - true on success, false on failure

Money Management

-- Add money to a job account
exports['ZDP-Masterjob']:addMoney(jobName, amount, personName, reason, isBill)
-- jobName: string - Name of the job
-- amount: number - Amount to add
-- personName: string - Name of the person adding the money
-- reason: string - Reason for the transaction
-- isBill: boolean (optional) - If this is a bill payment
-- Returns: boolean - true on success, false on failure

-- Remove money from a job account
exports['ZDP-Masterjob']:removeMoney(jobName, amount, personName, reason)
-- jobName: string - Name of the job
-- amount: number - Amount to remove
-- personName: string - Name of the person removing the money
-- reason: string - Reason for the transaction
-- Returns: boolean - true on success, false on failure

-- Get current money in job account
local money = exports['ZDP-Masterjob']:getJobMoney(jobName)
-- jobName: string - Name of the job
-- Returns: number or false if job doesn't exist

Job Information

-- Get job level
local level = exports['ZDP-Masterjob']:getJobLevel(jobName)
-- jobName: string - Name of the job
-- Returns: number or false if job doesn't exist

-- Get job type
local jobType = exports['ZDP-Masterjob']:getJobType(jobName)
-- jobName: string - Name of the job
-- Returns: string or false if job doesn't exist

-- Get level points for a specific level ID
local points = exports['ZDP-Masterjob']:getLevelPoint(jobName, id)
-- jobName: string - Name of the job
-- id: number - Level ID to get points for
-- Returns: number or false if job doesn't exist or invalid ID

Level Up Event

When a player levels up in a job, the following client event is triggered:

-- Triggered automatically on level up
TriggerClientEvent('zdp-jobs:client:levelUp', source, job, newLevel)
-- job: string - Name of the job
-- newLevel: number - The new level reached

Commands

  • /adminPanel - Opens the administration panel
  • /openBusiness - Opens the business interface
  • /createJob - Creates a new job (requires permissions)

Work Points

The script includes several types of work points that can be added and configured:

Salesman

  • Function: NPCs that sell items to customers
  • Configuration: Customizable NPC models and animations
  • Levels: Increases the limit of items that can be sold

Inventory

  • Function: Item storage for the company
  • Configuration: Weight and slots configurable per level
  • Integration: Compatible with ox_inventory

Garage

  • Function: Company vehicle parking
  • Configuration: Coordinates and spaces per level
  • Levels: Unlocks more parking spaces

Wardrobe

  • Function: Work uniform changing
  • Configuration: Basic, one level available

Cash Register

  • Function: Billing and collection system
  • Configuration: Basic, one level available

Order System

The script includes an order system where companies can:

  1. Buy items from the warehouse
  2. Pick up orders at specific coordinates
  3. Manage inventory of the company
  4. Sell items through salesman NPCs

Warehouse configuration

Config.PickupOrdersCoords = vec4(813.52, -2982.43, 5.02, 267.83)
Config.NpcModelPickupOrders = "a_m_m_eastsa_01"
Config.DefaultBlipPickupOrders = {
    type = 478,
    color = 21,
    label = "Warehouse"
}

Web Interface

The resource includes a modern web interface for managing:

  • Employees: Hiring, firing, and promotions
  • Finance: Money movements and billing
  • Inventory: Item and order management
  • Configuration: Company settings
  • Statistics: Detailed business information

Notifications and Messages

The script includes a complete system of configurable notifications:

Config.Strings = {
    ["Notifications"] = {
        FIRED_EMPLOYEE_SUCCESS = "Employee fired successfully",
        ASCENDED_EMPLOYEE_SUCCESS = "Employee promoted successfully",
        JOB_CREATED_SUCCESS = "Job created successfully",
        LEVEL_UP = "Congratulations! Your company has reached level ",
        -- ... more notifications
    }
}

Integration with Other Scripts

The exports system allows integrating ZDP-Masterjob with other resources:

-- Example: Check if a company is open
if exports['ZDP-Masterjob']:getIsJobOpened('my_company') then
    -- The company is open
end

-- Example: Add money for a sale
exports['ZDP-Masterjob']:addMoney('my_company', 500, 'Customer', 'Product sale', true)

Support

If you encounter any issues or have questions, please open a ticket on Discord.

Contributions

Contributions are welcome. Please read the contribution guidelines before submitting a pull request.

Terms of Use

This is proprietary software protected by copyright.

2025 ZDP Scriptsโ„ข All rights reserved.

The following is strictly prohibited:

  • Distributing, selling, or sharing this resource without express authorization
  • Reverse engineering the code
  • Modifying or altering the code without permission
  • Using parts of the code in other projects without authorization

Technical Support

For technical support, please contact the ZDP Scripts team through official channels