Client Functions

HasJob

frameworkName:HasJob(job)
  • job: string

Example:

function ESX:HasJob(job)
    return not job and true or self.Shared?.PlayerData?.job?.name == job
end

HasGrade

frameworkName:HasGrade(grade)
  • grade: number

Example:

function ESX:HasGrade(grade)
    return self.Shared?.PlayerData?.job?.grade >= grade
end

PayCheck

frameworkName:PayCheck(salary, percentage)
  • salary: number
  • percentage: number

Example:

function ESX:PayCheck(salary, percentage)
    TriggerServerEvent('ESX:Busdriver:PayCheck', salary, percentage)
end

SetPlayerUniform

frameworkName:SetPlayerUniform(on)
  • on: boolean

Example:

function ESX:SetPlayerUniform(on)
    if on then 
        TriggerEvent('skinchanger:getSkin', function(skin)
            TriggerEvent('skinchanger:loadClothes', skin, Config.Uniform[skin.sex == 0 and "Male" or "Female"])
        end)
 
        return
    end 
    
    ESX.Shared.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin)
        TriggerEvent('skinchanger:loadSkin', skin)
    end)
end