🧑💼 NPC Job Application System (Discord Role Integration)
A clean, configurable NPC job application system for ERS that allows players to apply for jobs directly through NPC kiosks, with optional Discord role-based job validation via night_discordapi.
Perfect for servers that want to make hiring immersive, secure, and automated.
⚙️ Features
NPC Job Kiosks: Spawn configured NPCs (police, EMS, fire, etc.) that players can interact with to apply for jobs.
Third-Eye Integration: Works with both ox_target and qb-target — configurable via
Config.Target.Framework Support: Compatible with QB, QBOX, ESX, and OX_Core.
Discord Verification: Uses night_discordapi to validate roles and guild membership before granting jobs.
Grade Syncing: Automatically sets player grade based on their Discord role (e.g., Officer, Sergeant, etc).
Configurable NPCs: Add as many kiosk NPCs as you want with unique coordinates, animations, and zone radii.
Cooldown Protection: Prevents spam by adding configurable apply cooldowns per player.
Simple Setup: Drop it in your resources folder and configure through
config.lua.
🧰 Configuration Overview
All settings are managed in config.lua:
Config.Framework = 'qb' -- Supports qb, qbx, esx, or ox
Config.Target = 'ox' -- Choose 'ox' or 'qb' for targeting system
Config.ApplyCooldownSeconds = 10 -- Prevents spam applies
Config.UseZones = true -- Enables third-eye zone targeting
Config.ZoneDebug = false
🔗 Discord Integration
Controlled through
Config.DiscordRequires night_discordapi
Supports guild whitelisting and role-based job gating
Auto-maps Discord roles to in-game grades
Example:
Config.Discord.gradeRoles = {
police = { ["Commissioner"]=7, ["Sergeant"]=3, ["Officer"]=2, ["Cadet"]=1 },
ambulance = { ["EMS Director"]=6, ["Paramedic"]=3, ["EMT"]=1 }
}
🧍♂️ Example NPC
{
model = `s_m_y_cop_01`,
coords = vec4(442.78, -981.91, 30.69, 84.71),
scenario = 'WORLD_HUMAN_CLIPBOARD',
label = 'Apply for Police Job',
job = 'police',
grade = 1,
frontOffset = 1.2,
zoneRadius = 1.6
}
🪄 Installation
Drag the folder into your
resourcesdirectory.Ensure dependencies are installed:
ox_lib
ox_target or qb-target
night_discordapi (optional, but required for Discord role gating)
Configure
config.luato match your server’s jobs, Discord guild, and role setup.Add to your server.cfg:
ensure npc-job-applicantsRestart your server or run
/in-game to reload kiosks.npc-job-applicants
🧩 Dependencies
| Dependency | Required | Purpose |
|---|---|---|
| ox_lib | ✅ | Notifications, utils, and requests |
| ox_target or qb-target | ✅ | Third-eye interaction zones |
| night_discordapi | Optional | Role validation and grade mapping |
| oxmysql | Optional | Framework DB connection |
🧠 Notes
Supports multi-framework job handling (automatic detection).
Gracefully fails if Discord API is unavailable.
All kiosks respawn on player load, respawn, or resource restart.
Modify
Config.JobAliasesto map custom job names.Discord roles must match exactly as they appear in your guild.
🧑🚒 Example Jobs Preconfigured
| Department | Location | Ped Model | Job Key |
|---|---|---|---|
| LSPD | Mission Row PD | s_m_y_cop_01 | police |
| BCSO | Sandy Shores | s_f_y_sheriff_01 | bcso |
| SAHP | Vinewood Hills | csb_cop | sahp |
| EMS | Pillbox Hill | s_m_m_paramedic_01 | ambulance |
| Fire | Davis Fire Station | s_m_y_fireman_01 | fire |
| Mechanic | Bennys | mp_f_bennymech_01 | mechanic |
🧑💻 Author
Created by: MOD CORE
Description: NPC-based job hiring with Discord grade sync
fx_version: cerulean
Frameworks Supported: QB, QBOX