Jump to content

Error


Enju12

Recommended Posts

Error:local isWorking = exports.CIGbusiness:getPlayerWorkingStatus(player) or false

function:

function viewMyJobInfo(player, key)
    if (getResourceFromName("CIGjobs") and getResourceState(getResourceFromName("CIGjobs")) == "running") then
        if (exports.CIGjobs:getPlayerJob(player) == "Pilot") then return end
        if (exports.CIGjobs:getPlayerJob(player) == "Trucker") then return end
        if (exports.CIGbusiness:getPlayerJob(player) == "Criminales") then return end
        if (exports.CIGbusiness:getPlayerJob(player) == "Serial Killer") then return end
        if (exports.CIGjobs:getPlayerJob(player) == "Farmer") then return end
    end
    if (isPedDead(player)) then return end
    local account = getPlayerAccount(player)
    if (not account) then return end
    local update = not key
    local accName = tostring(getAccountName(account))
    local playerJob = exports.CIGbusiness:getPlayerJob(player)
    local isWorking = exports.CIGbusiness:getPlayerWorkingStatus(player) or false
    local jobHunt = false
    local bus = getBusUserData(player)
    if (bus) then
        busdata = getBusinessData(bus[1])
        busStr = "Business Name: "..tostring(bus[1]).." | Employees: "..tostring(busdata[1]).." | Total Worth: "..tostring(busdata[2])
    else
        bus = {"", 0}
        busStr = "Business Name: N/A | Employees: N/A | Total Worth: N/A"
    end
    local invite = getPlayerBusinessInvite(player)
    local changes = prepareBusinessMessages(bus[1])
    local tasks = getPlayerTasks(player)
    if (not playerJob) then
        playerJob = "N/A"
    end
    triggerClientEvent(player, "CIGbusiness.viewMyInfo", player, accName, playerJob, isWorking, jobHunt, busStr, update, bus[2] > 0, bus[2] == 2 or bus[2] == 3, bus[2] == 3, invite, changes, tasks)
end

function beginViewMyJobInfo()
    viewMyJobInfo(client, "F3")
end
addEvent("CIGbusiness.vmji", true)
addEventHandler("CIGbusiness.vmji", root, beginViewMyJobInfo)

 

Edited by NeXuS™
Fixed formatting.
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...