Groot Development
Store
  • 👋Welcome
  • Coding Information
    • Register Key Mapping
  • ASSETS
    • 🕙g-duty
      • Why?
      • Installation
      • Config.lua
    • 📋g-scoreboard-V1
      • Installation
      • Config.lua
    • 📋g-scoreboardV2
      • Installation
      • Config.lua
      • Exports & Events
    • 🎁g-giftcard
      • Installation
      • Config.lua
      • Export
    • 🏡g-job-vehicle-shop
      • Installation
      • ⚙️Configuration
        • Exports
        • Create Vehicle Management Panel
        • Create Vehicle Shops
    • 💯g-redeem-code
      • 🗒️Features
      • Installation
      • ⛔Note
      • ⚙️Configuration
        • Create New item
    • 📖g-pausemenu
      • 🗒️Features
      • Installation
      • ⚙️Features Guide
        • Info Buttons
        • socials Buttons
        • Rules
        • Organization Avatar
    • 🛠️g-crafting
      • 🗒️Features
      • 📦Patch Details
      • Installation
      • ❔Why
      • ⚔️Exports
      • Configuration
        • How to Create New Station
        • How to Create crafting time for an item.
    • 🛒g-shopsV2
      • 🗒️Features
      • 📦Patch Details
      • Installation
      • ⚔️Exports
      • Configuration
        • How to Create New Shop
        • How to create new item
    • 🔧g-adv-modern-repairkit
      • 🗒️Features
      • 📦Patch Details
      • Installation
      • ⚙️Configuration
  • 📖g-pausemenu-simplified
    • 📦Patch Details
    • Installation
    • ❔Why
    • Configuration
      • Git Dev Patchs
  • FREE RELEASE
    • 🎁g-starterpack-gift
      • Installation
      • Config.lua
    • 👨‍🔬g-employee-chat-list
      • Installation
    • g-notifications
      • Installation
      • Notification
      • Framework Integration
      • Remove Notification By ID
Powered by GitBook
On this page
  1. ASSETS
  2. g-duty

Installation

The resources/db listed below are required in order to run this resource.

PreviousWhy?NextConfig.lua

Last updated 8 months ago

Requirements

  • oxmysql -

  • ox_lib -

  • ox_target -

Database

CREATE TABLE `g_duty` (
	`identifier` VARCHAR(46) NOT NULL COLLATE 'utf8mb4_general_ci',
	`job` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
	`player_name` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
	`last_duty` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
	`total_duty_time` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
	`grade_name` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci'
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
;

How to Create offduty / onduty jobs / grades example

-- Jobs Table
-- Format: (job_name, label, whitelisted)
-- job_name: Unique identifier for the job.
-- label: Display name for the job.
-- whitelisted: 0 for non-whitelisted, 1 for whitelisted (restricted access).
INSERT INTO `jobs` (`name`, `label`, `whitelisted`) VALUES
	-- job 1 
	('offpolice', 'Off Duty Police', 0),
	('police', 'LSPD', 0),
	-- job 2 
	('offambulance', 'Off Duty Doctor', 0),
	('ambulance', 'LSMD', 0),



-- Job Grades Table
-- Each job_name should have a corresponding off-duty version (e.g., 'police' and 'offpolice').
-- Format: (id, job_name, grade, name, label, salary, skin_male, skin_female)
-- id: Unique identifier for each grade entry.
-- job_name: The name of the job associated with this grade.
-- grade: The rank level within the job (e.g., 0, 1, 2).
-- name: Internal identifier for the grade.
-- label: Display name for the grade.
-- salary: The salary for the grade level.
-- skin_male, skin_female: JSON objects defining male and female skins for the grade (use '{}' if not defined).
INSERT INTO `job_grades` (`id`, `job_name`, `grade`, `name`, `label`, `salary`, `skin_male`, `skin_female`) VALUES
	-- grade 1
	(1, 'police', 3, 'advance', 'Advance', 1000, '{}', '{}'),
	(2, 'offpolice', 3, 'advanced', 'Advance OFF DUTY', 20, '{}', '{}'),
	-- grade 2
	(3, 'police', 2, 'constable', 'Constable', 0, '{}', '{}'),
	(4, 'offpolice', 2, 'constable', 'Constable OFF DUTY', 10, '{}', '{}'),
	
🕙
https://github.com/overextended/oxmysql
https://github.com/overextended/ox_lib
https://github.com/overextended/ox_target