Enju12 Posted March 10, 2018 Share Posted March 10, 2018 (edited) 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 March 11, 2018 by NeXuS™ Fixed formatting. Link to comment
NeXuS™ Posted March 11, 2018 Share Posted March 11, 2018 (edited) What's the error? Also, I fixed the formatting for you, if you post next time, please use the brackets for the code. Edited March 11, 2018 by NeXuS™ Link to comment
raynner Posted March 11, 2018 Share Posted March 11, 2018 (edited) local isWorking = nil if exports.CIGbusiness:getPlayerWorkingStatus(player) then isWorking = exports.CIGbusiness:getPlayerWorkingStatus(player) else isWorking = false end Edited March 11, 2018 by raynner Edit code Link to comment
DNL291 Posted March 12, 2018 Share Posted March 12, 2018 Show us what error you got from debug. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now