⚙️Script Configuration

Adjustments guide for mg-jobCenter


Framework Configuration

Defines which framework the script will use.


Database Configuration


Permissions System

Groups that will have access to use the command for the cooldown.


Phone System Configuration

This setting defines which phone system the script uses to display the player’s phone number in job applications and to send notifications (like messages or mails) to players when their job application is accepted or rejected.

📌 Options:

  • 'qb' → Use QBCore Phone integration.

  • 'codem-phone' → Use CodeM Phone integration.

  • 'qs-phone' → Use QS Phone integration.

  • 'qs-phone-pro' → Use QS Phone Pro integration.

  • 'lb-phone' → Use LB Phone integration.

  • false → Disable phone system integration.

📌 Additional Notes

  • If you don’t want the phone number displayed in the job application, or you don’t want the script to send notifications when applications are accepted/rejected, set this to false.

  • If you are not using a whitelist job system, it is recommended to set this to false.

  • You can extend or add support for other phone systems by modifying server/functions.lua.


Default Dark Mode Configuration

Enables dark mode by default in the Job Center UI.

  • If the player hasn’t interacted with the dark mode toggle button or never saved a preference, this setting will define the default appearance.

  • Set to true to enable dark mode by default, false to use light mode.


Interaction Configuration

Defines the interaction system the player uses to access the Job Center.

📌 Options:

  • 'qb-target' → Uses qb-target

  • 'ox-target' → Uses ox_target

  • 'codem-textui' → Uses CodeM-TextUI

  • 'drawtext' → Uses native 3D text

📌 Additional Notes

  • You can extend or add support for other interaction systems by modifying client/interactionHandler.lua.


Job Center Location Configuration

Defines the location, NPC, and map blip for the Job Center.

  • coords

    • Coordinates for the Job Center interaction point (used by the menu, blip, and NPC).

    • Format: vector3(x, y, z)

  • ped

    • 📌 Options:

      • enable → Enables or disables the ped

      • model → The ped model name (e.g., "s_m_m_highsec_01")

      • heading → Direction of the ped

  • blip

    • 📌 Options:

      • enable → Enables or disables the blip

      • sprite → Blip icon ID (see Blip Reference)

      • color → Blip color ID (see Blip Reference)

      • scale → Size/scale of the blip

      • name → Label that appears on the map


Cooldown Configuration

These settings control the cooldown system that prevents players from switching jobs too frequently.

  • Config.EnableCooldown

    • Enables or disables the cooldown system entirely. If set to false, players can change jobs freely without any waiting period.

  • Config.CooldownType

    • 📌 Options:

      • 'center': The cooldown will only be applied when a player changes their job at the Job Center.

      • 'all': The cooldown will be applied when a player changes their job through any method, including admin commands or job hiring scripts.

  • Config.CooldownDays

    • The number of days a player must wait before they can change their job again.

  • Config.CooldownHours

    • Converts CooldownDays to hours for more accurate internal cooldown tracking and database storage.

Whitelist Job Applications Configuration

These settings control the whitelist job application system, allowing players to apply for specific jobs and staff to manage these applications in-game or via Discord webhooks.

  • Config.EnableWhitelistJobs

    • Enables or disables the Whitelist tab in the Job Center UI. When enabled, players will see a tab for jobs that require approval (e.g., police, EMS).

  • Config.WhilelistApplications.target

    • This defines where the application data is handled.

    • 📌 Options:

      • 'webhook': Applications are sent to a Discord webhook.

      • 'game': Job superiors can review, accept or reject applications directly in-game.

      • 'both': Enables both the webhook and in-game approval system.

  • Config.WhilelistApplications.jobs

    • This defines which jobs can manage applications and where the application reviewers for each job are located.

    • 📌 Options:

      • jobname: Job identifier (must match the job name in Config.Jobs.whitelist).

      • minimumGrade: Minimum job grade required to access the job’s applications menu.

      • coords: The location where the application ped and interaction will appear.

      • ped.enable: Whether to spawn an NPC for interactions.

      • ped.model: The ped model to use.

      • ped.heading: The direction the ped faces.

Job List Configuration

This section defines the available jobs players can apply for via the Job Center. Jobs are divided into public (no application needed) and whitelist (application and approval required).

  • 📌 Public Jobs:

    • A list of jobs available to all players without requiring approval. These jobs appear in the Public Jobs tab of the Job Center.

  • 📌 Whitelist Jobs:

    • A list of restricted jobs that require approval. These jobs appear in the Whitelist Jobs tab.

Important!

Language Configuration

This table contains all the strings shown to players or staff, grouped by section to simplify translation, customization, and UI management.

Notifications Configuration

This table defines pre-configured messages that can be triggered in the code to notify players about success, errors, or info. Each entry includes a message and a type.

These messages are only triggered server-side and sent to the player through Config.ServerNotification.

Discord Logging Configuration

This configuration controls the log system of the job center and application system. It allows you to send log messages to different Discord webhooks based on the type of action and the context.

  • SVConfig.logSystem

    • If set to true, logging is enabled and the system will send messages to the configured Discord webhooks.

    • If set to false, no logs will be sent.

  • SVConfig.webhooks

    • This is where you define the Discord webhooks used for different log events. It is structured into three main sections:

      • sendApplicationPlayer

        • Sent when a player submits a whitelist application and Config.WhitelistApplications.target is set to "webhook" or "both" .

        • Each key must match the job name defined in Config.Jobs.whitelist.

        • These webhooks will receive the application message directly to the players (useful for job managers or private Discord channels for each department).

      • sendApplicationStaff

        • Sent always, no matter the Config.WhitelistApplications.target.

          • This is for staff logs, allowing admins or moderators to keep track of submitted applications in a centralized place.

          • These will include a more detailed version of the application

      • Actions Logs

        • These are webhook URLs used for specific system events.

Last updated