Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Cant find job on esx legacy? #9

Open
SuperRustly opened this issue Aug 20, 2023 · 2 comments
Open

Cant find job on esx legacy? #9

SuperRustly opened this issue Aug 20, 2023 · 2 comments

Comments

@SuperRustly
Copy link

it cant find an job on client 51

@anes66
Copy link

anes66 commented Aug 21, 2023

same problem here

@bert1475
Copy link

Hi i have a solution to your problem!!
Go to your client.lua and replace the

function GetJob()
    local PlayerData = PlayerData()
    if Framework == 1 then
        return PlayerData.job.name ,PlayerData.job.grade.level
    elseif Framework == 2 then
        return PlayerData.job.name, PlayerData.job.grade
    end
end

with

function GetJob()
    local Player = PlayerData() 
    if not Player or not Player.job then
        return nil, nil 
    end

    if Framework == 1 then
        return Player.job.name, Player.job.grade.level
    elseif Framework == 2 then
        return Player.job.name, Player.job.grade
    else
        return nil, nil 
    end
end

then it should work

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants