Samuel's Development, Official Documentation
  • 🎉Welcome
  • đź“‘Overview
    • Resources
      • Bobcat Weapon Heist
        • Installation Guide
        • Configuration
      • Traphouse Robbery
        • Installation Guide
        • Configuration
      • Pacific Bank Heist
        • Installation Guide
        • Configuration
      • Oxy Run
        • Installation Guide
        • Configuration
      • Dumpster Diving
        • Installation Guide
        • Configuration
        • Log Configuration
      • Warehouse Heist
        • Installation Guide
        • Configuration
      • Oil Rig
        • Installation Guide
        • Configuration
      • Beekeeping
        • Installation Guide
        • Configuration
        • Log Configuration
      • Multijob & Boss Menu
        • Installation Guide
        • Exports
        • Configuration
        • Log Configuration
      • Yacht Robbery
        • Installation Guide
        • Configuration
      • Notify
        • Installation
        • Configuration
      • Cocaine Mission
        • Installation Guide
        • Configuration
      • Advanced Drug Sales
        • Installation Guide
        • Configuration
    • Library
      • Installation & Integration
      • Modules
        • Client
          • Callback
          • StartProgress
          • LoadAnim
          • LoadModel
          • LoadPtfxAsset
          • ShowNotification
          • SendEmail
          • PoliceDispatch
          • StartHack
        • Server
          • Callback
          • Name
          • Money
          • Logger
          • Inventory
          • HasGroup
          • GetPlayer
          • GetPlayers
          • GetPlayerByIdentifier
          • GetIdentifier
          • GetPlayerGender
          • CheckVersion
        • Shared
          • Array
          • Table
          • String
          • Math
          • Locale
            • JSON Example
          • AwaitLoad
          • Framework
  • 📚F.A.Q
    • How do I change Locales?!
    • How to add Police Alerts?!
    • What types of dirty money are supported?
Powered by GitBook
On this page
  1. Overview
  2. Resources
  3. Multijob & Boss Menu

Configuration

Config = {}

SD.Locale.LoadLocale('en') -- Load the locale language, if available. You can change 'en' to any other available language in the locales folder.

Config.Debug = false -- Enable/Disable the debug for polyzones

-- How long (in seconds) bonus and message notifications persist before expiring.
Config.NotificationDuration = 259200 -- 72h (in seconds)

Config.UseSociety = {
    enable   = true,   -- when true: use built-in society accounting  -- when false: fall back to your custom logic
    -- Modifying deposit function is only useful to you if you plan on handling society with my resource. If you handle society completely independently,
    -- like through Renewed-Banking as an example, then simply setting the enable param above to false will suffice and you don't have to edit that function.
    -- the getBalance and withdraw functions are REQUIRED to be edited for it to support giving employee's bonuses, assuming enable is false.

    --- Deposit into a society account.
    --- @param source     number  The boss’s server ID performing the deposit.
    --- @param jobName    string  The society/job key (e.g. "police").
    --- @param amount     number  Amount to deposit (must be > 0).
    --- @param moneyType  string  "cash" or "bank".
    --- @return number|false      New balance on success, or false on error.
    deposit = function(source, jobName, amount, moneyType)
        -- your custom deposit logic here…
        -- e.g. YourBankAPI.deposit(jobName, amount)
        return false
    end,

    --- Withdraw from a society account.
    --- @param source     number  The boss’s server ID performing the withdrawal.
    --- @param jobName    string  The society/job key (e.g. "police").
    --- @param amount     number  Amount to withdraw (must be > 0).
    --- @param moneyType  string  "cash" or "bank".
    --- @return number|false      New balance on success, or false on error.
    withdraw = function(source, jobName, amount, moneyType)
        -- your custom withdrawal logic here…
        -- e.g. YourBankAPI.withdraw(jobName, amount)
        return false
    end,

    --- Get the current society balance (and optionally transaction history).
    --- @param source  number  The boss’s server ID requesting balance.
    --- @param jobName string  The society/job key (e.g. "police").
    --- @return number|false    Current balance, or false if unauthorized/error.
    getBalance = function(source, jobName)
        -- your custom balance retrieval here…
        -- e.g. local bal = YourBankAPI.getBalance(jobName)
        return false
    end,
}

-- Definition of each available job: its map icon, pay scales by grade, and human-readable grade labels.
-- So on qb-core for example, you'd effectively copy/mimic the entries from the shared/jobs.lua file here.
Config.Jobs = {
    police = {
        icon = "shield",  -- FontAwesome icon for menus/maps
        salaries = {      -- Salary payout per payday, indexed by job grade
            [1] = 1000,
            [2] = 1500,
            [3] = 2000,
            [4] = 2500,
            [5] = 3000,
        },
        gradeLabels = {   -- Display names for each grade
            [1] = "Officer",
            [2] = "Detective",
            [3] = "Sergeant",
            [4] = "Lieutenant",
            [5] = "Captain"
        }
    },
    -- Example for other job entries
    
    ambulance = {
        icon = "ambulance",
        salaries = {
            [1] = 900,
            [2] = 1300,
            [3] = 1700,
            [4] = 2100,
            [5] = 2500,
        },
        gradeLabels = {
            [1] = "Paramedic",
            [2] = "Senior Paramedic",
            [3] = "Supervisor",
            [4] = "Chief Paramedic",
            [5] = "Medical Director"
        }
    },
    -- You can add more...
}

-- Locations and everything else related to every job.
Config.Zones = {
    police = {
        duty = {
            enabled = true,
            interactionType = "marker", -- how the player toggles duty: "target", "textui", or "marker"
            coords          = vec3(440.48, -976.02, 29.69),
            distance        = 3.0,
            marker = { -- if target or textui this table is ignored
                type    = 1,
                red     = 0,
                green   = 155,
                blue    = 255,
                opacity = 150,
            },
        },
        dutyZone = { -- Essentially, if enabled, you HAVE to be in the zone to be on duty. You can't go on-duty outside and if you're on duty and leave you'll be forced off.
            enabled = false,     -- whether to auto–offduty when leaving this zone
            timeout = {
                enabled = true,  -- if true, delayed offduty; if false, immediate offduty
                seconds = 30,    -- delay in seconds
            },
            -- polygon defining the auto–offduty area
            points    = {
                vec3(416.3, -961.91, 25.0),
                vec3(498.26, -962.05, 25.0),
                vec3(494.67, -1042.9, 25.0),
                vec3(403.34, -1046.47, 25.0),
            },
            thickness = 100.0,  -- draw thickness / detection width
        },
        bossMenu = {
            enabled         = true,
            interactionType = "marker",  -- "marker", "target", or "textui"
            coords          = vec3(448.21, -973.12, 29.69),
            distance        = 2.5, 
            marker = { -- ignored for target/textui
                type    = 1,
                red     = 255,
                green   = 200,
                blue    = 0,
                opacity = 150,
            },
        },
    },
    -- Example for other more entries
    --[[
    ambulance = {
        duty = {
            enabled = true,
            interactionType = "textui",
            coords    = vector3(440.0, -980.0, 30.0),
            distance  = 2.0,
            marker    = { -- ignored by textui/target
                type    = 1,
                red     = 0,
                green   = 155,
                blue    = 255,
                opacity = 150,
            },
        },
        dutyZone = {
            enabled = true,     -- whether to auto–offduty when leaving this zone
            timeout = {
                enabled = true,  -- if true, use delayed offduty; if false, offduty immediately
                seconds = 30,    -- how many seconds outside before auto-offduty
            },
            -- polygon defining the auto–offduty area
            points    = {
                vector2(295.0, -1440.0),
                vector2(315.0, -1430.0),
                vector2(325.0, -1460.0),
                vector2(305.0, -1470.0),
            },
            thickness = 1.0,
        },
    },
    ]]
    -- You can add more...
}

-- Which statistics to display per job in the “View Stats” menu, and how to format each entry.
-- You can increment the stats via the updateStats export. exports['sd-multijob']:updateStats(src, jobName, statKey, increment)
-- So as an example, to increment the police arrests stat by 1 for source 1, you would call: exports['sd-multijob']:updateStats(1, 'police', 'arrests', 1)
Config.Stats = {
    police = { -- job key 
        {
            key         = "minutesWorked",      -- Internal stat name (minutesWorked works for ALL jobs as a stat by default)
            title       = "Time on Duty",       -- Menu title
            icon        = "clock",              -- Icon for this stat
            -- no description here; uses FormatMinutesWorked
        },
        {
            key         = "arrests", -- Internal stat name
            title       = "Arrests Made", -- Menu title
            description = "You made {amount} arrests.",  -- {amount} interpolates the value
            icon        = "handcuffs" -- Icon for this stat
        },
        {
            key         = "ticketsIssued",
            title       = "Tickets Issued",
            description = "You issued {amount} tickets.",
            icon        = "ticket"
        },
        {
            key         = "vehiclesImpounded",
            title       = "Vehicles Impounded",
            description = "You impounded {amount} vehicles.",
            icon        = "car"
        },
        {
            key         = "callsResponded",
            title       = "Calls Responded",
            description = "You responded to {amount} calls.",
            icon        = "phone"
        },
        {
            key         = "bonuses",
            title       = "Bonuses Received",
            description = "You received ${amount} in bonuses.",
            icon        = "gift"
        }
    },
    ambulance = {
        {
            key   = "minutesWorked",
            title = "Time on Duty",
            icon  = "clock"
        },
        {
            key         = "patientsSaved",
            title       = "Patients Saved",
            description = "You saved {amount} lives.",
            icon        = "heart-pulse"
        },
        {
            key         = "revives",
            title       = "Revives Performed",
            description = "You revived {amount} players.",
            icon        = "heart"
        },
        {
            key         = "transportsCompleted",
            title       = "Transports Completed",
            description = "You transported {amount} patients.",
            icon        = "car-side"
        },
        {
            key         = "suppliesUsed",
            title       = "Supplies Used",
            description = "You used {amount} medical supplies.",
            icon        = "box-medical"
        },
        {
            key         = "bonuses",
            title       = "Bonuses Received",
            description = "You received ${amount} in bonuses.",
            icon        = "gift"
        }
    },
    -- You can add more...
}

-- Leaderboard scoring weights: how much each stat contributes to overall rank.
Config.Leaderboard = {
    police = {
        timeWeight  = 1, -- Points per minute on duty
        statWeights = {
            arrests             = 60,  -- Points per arrest
            ticketsIssued       = 10,  -- Points per ticket issued
            vehiclesImpounded   = 30,  -- Points per vehicle impounded
            callsResponded      = 15,  -- Points per call responded
            bonuses             = 1    -- Points per dollar in bonuses
        },
    },

    -- Example detailed stat weights for the ambulance job
    ambulance = {
        timeWeight  = 1, -- Points per minute on duty
        statWeights = {
            patientsSaved         = 45, -- Points per patient saved
            revives               = 20, -- Points per revive performed
            transportsCompleted   = 15, -- Points per transport completed
            suppliesUsed          = 5,  -- Points per supply used
            bonuses               = 1   -- Points per dollar in bonuses
        },
    },
    -- You can add more...
}
PreviousExportsNextLog Configuration

Last updated 6 days ago

đź“‘