free-resources
Contract - Job Posting

Contract - Job Posting

Advanced, Optimized & Dynamic Job Posting / Contract System | Framework Agnostic

lcky-contract is a highly optimized job posting and contract system for FiveM. Built with a robust Bridge Architecture that natively supports multiple frameworks out of the box.


โœจ Features

Framework Support

  • ๐Ÿ—๏ธ Framework Agnostic - Supports qbx_core, qb-core, and es_extended
  • ๐ŸŽฏ Target Support - Compatible with ox_target and qb-target
  • ๐ŸŒ Universal Access - Any player can post jobs (no job restrictions)

Database Optimization

  • ๐Ÿง  Smart Filtering - Expired listings filtered dynamically
  • ๐Ÿงน Auto Cleanup - Background loop cleans expired rows every 1 hour
  • ๐Ÿ’พ No Bloat - SQL tables stay clean

UI & Features

  • ๐ŸŽจ ox_lib UI - Beautiful input dialogs, context menus, and alerts
  • ๐Ÿ“ My Postings Hub - Manage your active postings (update/delete)
  • โฐ Configurable Limits - Set maximum posting duration (e.g., 72 hours)
  • ๐Ÿ“ Dynamic NPC Spawning - NPC spawns only when players nearby (0.00ms usage)

๐Ÿ“ฆ Dependencies

DependencyRequired
ox_lib (opens in a new tab)โœ…
oxmysql (opens in a new tab)โœ…
Framework (qbx_core, qb-core, or es_extended)โœ…
Target System (ox_target or qb-target)โœ…

๐Ÿš€ Installation

Step 1 - Place the Resource

resources/
โ””โ”€โ”€ [lcky-scripts]/
    โ””โ”€โ”€ lcky-contract/

Step 2 - Database Setup

Execute the SQL file at install/contracts.sql in your database (HeidiSQL, phpMyAdmin, etc.)

Step 3 - Configuration

Edit shared/config.lua:

-- Choose your Framework: 'qbx', 'qb', or 'esx'
Config.Framework = 'qbx'
 
-- Choose your Target system: 'ox_target' or 'qb-target'
Config.Target = 'ox_target'
 
-- Maximum duration (in hours) a player can list a job
Config.MaxDuration = 72

Step 4 - Add to server.cfg

ensure ox_lib
ensure oxmysql
ensure lcky-contract

โš™๏ธ NPC Configuration

Add or move NPCs in shared/config.lua:

Config.NPCs = {
    {
        model = `a_m_y_business_02`,  -- Ped model
        coords = vector4(238.48, -407.97, 47.92, 345.5),  -- X, Y, Z, Heading
        scenario = "WORLD_HUMAN_STAND_MOBILE"  -- Animation
    },
    -- Add more NPCs as needed
}

๐ŸŽฎ In-Game Usage

1. Locate the NPC

Find the Job Center NPC at the configured coordinates.

2. Main Menu Options

  • Create Job Posting - Fill out Business Name, Job Title, Salary, Contact, Description, Duration
  • View Job Postings - Browse all active jobs on the server
  • My Postings - View, Update, or Delete your own postings

3. Contact Employer

Click the "Contact" button to copy the employer's phone number to clipboard.


๐ŸŒ Localization

Everything is 100% translatable. Edit locales/en.json:

{
    "create_posting": "Create Job Posting",
    "view_postings": "View Job Postings",
    "my_postings": "My Postings"
}

๐Ÿ—๏ธ Bridge System

The script automatically detects your framework:

shared/bridge/
โ”œโ”€โ”€ init.lua     โ†’ Auto-detect framework
โ”œโ”€โ”€ qb.lua       โ†’ QBX/QB-Core adapter
โ””โ”€โ”€ esx.lua      โ†’ ESX adapter

๐Ÿ“‹ Commands

CommandDescription
/contractOpen main contract menu

๐Ÿ“ License

Developed by LuckyScripts