rcore.cz
  • rcore.cz
  • Installation
  • github wiki
  • ESX
    • ESX Instance
    • Jobs
    • esx_datastore
  • Natives
    • Markers
    • 3D Text
    • Common functions
    • Command system
    • Camera API
    • Objects
    • Blips
    • Discord sender
  • Our links
    • Discord
    • Github
    • Our service
Powered by GitBook
On this page
  • Overview
  • Job functions
  • Create job
  • Create job grade

Was this helpful?

  1. ESX

Jobs

Jobs creation, grades using esx_society

Overview

Job system in ESX (esx_society) is working with job and job grades, job can be whitelisted or not if you are using jobmenu you will 100% use it, every job grade has its own salary and name, please dont forget that name of job and display name is two different thinks, you cannot use diacriticts or special characters in name, but in display name you can.

rcore framework is creating every job into database so you dont have to import any sql files, if you change code rcore will update grades or create new records

Job functions

  • isJobExists(jobName, callback)

  • createJob(name, displayName, whitelisted)

  • isJobGradeExists(name, jobName, callback)

  • createJobGrade(jobName, grade, name, displayName, salary)

Create job

your_server.lua
rcore = exports.rcore

--Create job if not exists, its async method so we dont want to any response, 
--and last parameter says its whitelisted job
rcore:createJob('bazar','Car bazar',true)

Create job grade

-- First is job name that we create above
-- Second is grade number, look for esx_society documentation for more info
-- Third is name of grade that you can use at your scripts
-- Four params is grade label that will show player that has this job grade
-- Last is salary
rcore:createJobGrade('bazar',0,'sellerjunior','Newbie seler',1000)
rcore:createJobGrade('bazar',1,'seller','Seller',1400)
rcore:createJobGrade('bazar',2,'sellersenior','Good seller',1700)
rcore:createJobGrade('bazar',3,'boss','Boss',2000)

PreviousESX InstanceNextesx_datastore

Last updated 4 years ago

Was this helpful?