Installation
Add dependencies:
PolyZone: https://github.com/mkafrin/PolyZone
Add the script:
Add the script into resources folder.
Import dealers.sql into database.
Start the script in server.cfg
Apply Modifications: (if you want to add new job with /adddealerjob)
Add this code at the bottom of "es_extended/server/common.lua"
RegisterNetEvent('esx:refreshJobs', function(cb, triggerCheck)
if triggerCheck then
triggerCheck(true)
return
end
local Jobs = {}
MySQL.Async.fetchAll('SELECT * FROM jobs', {}, function(jobs)
for k, v in ipairs(jobs) do
Jobs[v.name] = v
Jobs[v.name].grades = {}
end
MySQL.Async.fetchAll('SELECT * FROM job_grades', {}, function(jobGrades)
for k, v in ipairs(jobGrades) do
if Jobs[v.job_name] then
Jobs[v.job_name].grades[tostring(v.grade)] = v
end
end
for k2, v2 in pairs(Jobs) do
if ESX.Table.SizeOf(v2.grades) == 0 then
Jobs[v2.name] = nil
end
end
ESX.Jobs = Jobs
if cb then
cb(true)
end
end)
end)
end)Add this code at the bottom of "esx_addonaccount/server/main.lua"
Add this code at the bottom of "esx_society/server/main.lua"
Notes:
Don't upload the script with FileZilla, Use Winscp if you are using FTP for file uploading.
Renaming of the script is not allowed.
We do not support custom frameworks, highly modified versions of ESX, or deprecated/outdated versions of anything.
Last updated