JobSelector – QBCore NUI Job Center (Playtime Based)
Turn your job center into a clean, visual hub fully driven by real playtime.
JobSelector adds a modern NUI Job Center on top of QBCore, where players unlock and select jobs based on their actual hours played (playtime stored in the database), instead of commands or items.
🔥 Main Features
Playtime‑based job unlocks
Jobs are unlocked automatically depending on how many hours a character has played, using a dedicated playtime table in the database (seconds → hours). No fake XP, no manual commands.
Modern NUI Job Center
Full‑screen UI with:
- job list on the left
- detailed job panel on the right: name, description, required hours, mini‑info list
- big preview background image per job.
Per‑job background images
Each job has its own background image configured in config.lua and loaded from html/images, perfect for branding and making each job feel unique.
QBCore‑integrated logic
Uses QBCore players, citizenid and QBCore.Functions.SetJob to safely change jobs only when requirements are met, plus QBCore notifications for feedback.
Playtime stored in DB (oxmysql)
Playtime is read from / written to a dedicated database table (player_playtime) using oxmysql. The menu always shows the real played hours per character.
Optimized & escrow‑ready
- Client only handles NUI and visuals.
- All validation and job‑setting logic runs server‑side.
- Structure is ready for CFX Asset Escrow, with
config.lualeft open for server owners.
⚙️ Configuration
Everything important is centralized in config.lua (kept open in escrow):
JobSelector ped & blip
OGJS.JobSelectorArea lets you configure:
- ped model, heading and coordinates
- 3D help text (
[E] - Job Selector) - map blip (sprite, color, label).
Jobs list (OGJS.Jobs)
Each job entry includes:
-
jobName,jobGrade– QBCore job and grade -
label– display name in the UI -
requiredHours– minimum hours played to unlock -
icon– Font Awesome icon class (e.g.fa-solid fa-truck) -
jobDescription– long job description shown on the right panel -
background– NUI image path likeimages/garbage.png -
miniInfos– bullet‑point tips shown under the job (time, earnings, notes, etc.).
Progress settings
-
OGJS.HoursPerLevel– how many hours are required per “level” for the progress bar -
OGJS.NeededXP– used to calculate the circular progress feel (0–100%).
Language / text
OGJS.Language lets you change:
- “START NOW”, “HOURS PLAYED”, “NOT ENOUGH HOURS”
- button labels and small UI texts, for easy localization.
📦 Requirements
-
qb-core(QBCore framework) -
oxmysql(MySQL wrapper used for all playtime queries)
🗄️ Database
The script uses its own playtime table:
player_playtime
-
citizenid– identifies the character (matches QBCore) -
playtime– total time played in seconds
Playtime is incremented via server events and read each time a player opens the JobSelector, so the UI always matches their real playtime.
🔧 Installation
- Place the
JobSelectorfolder into yourresourcesdirectory. - Make sure
qb-coreandoxmysqlstart before this resource. - Add to your
server.cfg:textensure JobSelector - Edit
config.lua:- set the Job Center ped location and blip
- configure jobs, descriptions, required hours and icons
- set image paths under
html/imagesto match your server branding.
🔒 Asset Escrow
- Sold as a CFX Asset Escrow resource.
- The following files remain open for server owners:
-
config.lua - (optionally) NUI files (HTML/CSS/JS) and images, depending on how you package it.
-
Client and server logic are protected to prevent leaks, while all important configuration stays fully editable.
🛠️ Support
For support, questions or custom changes, join the Discord:
https://discord.gg/aSc68qzPHj
When opening a ticket, please include:
- Your FiveM build and QBCore version.
- Any server/client console errors.
- Your
config.luachanges (or screenshots).