Disable hud in es_extended config
I did that. I follow the instructions correctly but nothing is changing
Same here my friendâŚ!!! No solution yet⌠It seems like new es_extended issue.
(Sorry for thatâŚ) The esx_customui do the job, with his instructions.
But it is not the same
Hi i have a problem.
When i hop in to my server only the Society acount is visible, no job, no hunger. However the speeometer and IN-Vehicle functions.
Awesome release 
Is it possible to change the status icons by images?
If yes, how ?
I tried by replacing:
by
</ img
then placing hunger.png in img folder and referencing the image in the manifest, but that doesnât work.
Thx ! And sorry for my englis ^^
Witch
Thanks bro I install the esx_customui is fine I like it is nice toâ:blush: but I have there problem to the hunger and thirsty is not workingâ:roll_eyes:. Luckily money and job there work. 
ESX_SOCIETY I installed it but my version of the old version installed the new version will not be compatible with my esx please help me with
[image]
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
while ESX.GetPlayerData().job == nil do
Citizen.Wait(10)
end
ESX.PlayerData = ESX.GetPlayerData()
RefreshBussHUD()
end)
RegisterNetEvent('fea1d1b0-b60d-431d-8e54-ea91f8cd0b71')
AddEventHandler('fea1d1b0-b60d-431d-8e54-ea91f8cd0b71', function(job)
ESX.PlayerData.job = job
RefreshBussHUD()
end)
function RefreshBussHUD()
DisableSocietyMoneyHUDElement()
if ESX.PlayerData.job.grade_name == 'boss' then
EnableSocietyMoneyHUDElement()
ESX.TriggerServerCallback('3962e179-effe-4c1b-8b75-101395a829ee', function(money)
UpdateSocietyMoneyHUDElement(money)
end, ESX.PlayerData.job.name)
end
end
RegisterNetEvent('74ebe320-6b6c-4a0b-8edd-9b2073c1ee4a')
AddEventHandler('74ebe320-6b6c-4a0b-8edd-9b2073c1ee4a', function(society, money)
if ESX.PlayerData.job and ESX.PlayerData.job.grade_name == 'boss' and 'society_' .. ESX.PlayerData.job.name == society then
UpdateSocietyMoneyHUDElement(money)
end
end)
function EnableSocietyMoneyHUDElement()
local societyMoneyHUDElementTpl = '<div><img src="' .. base64MoneyIcon .. '" style="width:20px; height:20px; vertical-align:middle;"> {{money}}</div>'
if ESX.GetConfig().EnableHud then
ESX.UI.HUD.RegisterElement('society_money', 3, 0, societyMoneyHUDElementTpl, {
money = 0
})
end
TriggerEvent('6675b4fb-33d4-46f6-81e4-245ce2b9514b', true)
end
function DisableSocietyMoneyHUDElement()
if ESX.GetConfig().EnableHud then
ESX.UI.HUD.RemoveElement('society_money')
end
TriggerEvent('6675b4fb-33d4-46f6-81e4-245ce2b9514b', false)
end
function UpdateSocietyMoneyHUDElement(money)
if ESX.GetConfig().EnableHud then
ESX.UI.HUD.UpdateElement('society_money', {
money = ESX.Math.GroupDigits(money)
})
end
TriggerEvent('22697e09-4095-4089-af67-b343a21cc71e', money)
end
function OpenBossMenu(society, close, options)
local isBoss = nil
local options = options or {}
local elements = {}
ESX.TriggerServerCallback('074ff3dc-fdc7-4ac2-a2f6-6c31feae9931', function(result)
isBoss = result
end, society)
while isBoss == nil do
Citizen.Wait(100)
end
if not isBoss then
return
end
local defaultOptions = {
withdraw = true,
deposit = true,
wash = true,
employees = true,
grades = true
}
for k,v in pairs(defaultOptions) do
if options[k] == nil then
options[k] = v
end
end
if options.withdraw then
table.insert(elements, {label = _U('withdraw_society_money'), value = 'withdraw_society_money'})
end
if options.deposit then
table.insert(elements, {label = _U('deposit_society_money'), value = 'deposit_money'})
end
if options.wash then
table.insert(elements, {label = _U('wash_money'), value = 'wash_money'})
end
if options.employees then
table.insert(elements, {label = _U('employee_management'), value = 'manage_employees'})
end
if options.grades then
table.insert(elements, {label = _U('salary_management'), value = 'manage_grades'})
end
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'boss_actions_' .. society, {
title = _U('boss_menu'),
align = 'top-left',
elements = elements
}, function(data, menu)
if data.current.value == 'withdraw_society_money' then
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'withdraw_society_money_amount_' .. society, {
title = _U('withdraw_amount')
}, function(data, menu)
local amount = tonumber(data.value)
if amount == nil then
ESX.ShowNotification(_U('invalid_amount'))
else
menu.close()
TriggerServerEvent('5963e18d-0f60-4e44-9b3e-b683c95cb85c', society, amount)
end
end, function(data, menu)
menu.close()
end)
elseif data.current.value == 'deposit_money' then
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'deposit_money_amount_' .. society, {
title = _U('deposit_amount')
}, function(data, menu)
local amount = tonumber(data.value)
if amount == nil then
ESX.ShowNotification(_U('invalid_amount'))
else
menu.close()
TriggerServerEvent('55b83643-85c6-4152-b055-c8bc89703457', society, amount)
end
end, function(data, menu)
menu.close()
end)
elseif data.current.value == 'wash_money' then
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'wash_money_amount_' .. society, {
title = _U('wash_money_amount')
}, function(data, menu)
local amount = tonumber(data.value)
if amount == nil then
ESX.ShowNotification(_U('invalid_amount'))
else
menu.close()
TriggerServerEvent('d4b2a6a3-a089-43cd-ae1a-995d1292f9f3', society, amount)
end
end, function(data, menu)
menu.close()
end)
elseif data.current.value == 'manage_employees' then
OpenManageEmployeesMenu(society)
elseif data.current.value == 'manage_grades' then
OpenManageGradesMenu(society)
end
end, function(data, menu)
if close then
close(data, menu)
end
end)
end
function OpenManageEmployeesMenu(society)
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'manage_employees_' .. society, {
title = _U('employee_management'),
align = 'top-left',
elements = {
{label = _U('employee_list'), value = 'employee_list'},
{label = _U('recruit'), value = 'recruit'}
}
}, function(data, menu)
if data.current.value == 'employee_list' then
OpenEmployeeList(society)
end
if data.current.value == 'recruit' then
OpenRecruitMenu(society)
end
end, function(data, menu)
menu.close()
end)
end
function OpenEmployeeList(society)
ESX.TriggerServerCallback('d760985d-457b-4aaa-805f-ad80fcc1858f', function(employees)
local elements = {
head = {_U('employee'), _U('grade'), _U('actions')},
rows = {}
}
for i=1, #employees, 1 do
local gradeLabel = (employees[i].job.grade_label == '' and employees[i].job.label or employees[i].job.grade_label)
table.insert(elements.rows, {
data = employees[i],
cols = {
employees[i].name,
gradeLabel,
'{{' .. _U('promote') .. '|promote}} {{' .. _U('fire') .. '|fire}}'
}
})
end
ESX.UI.Menu.Open('list', GetCurrentResourceName(), 'employee_list_' .. society, elements, function(data, menu)
local employee = data.data
if data.value == 'promote' then
menu.close()
OpenPromoteMenu(society, employee)
elseif data.value == 'fire' then
ESX.ShowNotification(_U('you_have_fired', employee.name))
ESX.TriggerServerCallback('70c8d001-a997-4a62-956c-7451693dbaa5', function()
OpenEmployeeList(society)
end, employee.identifier, 'unemployed', 0, 'fire')
end
end, function(data, menu)
menu.close()
OpenManageEmployeesMenu(society)
end)
end, society)
end
function OpenRecruitMenu(society)
ESX.TriggerServerCallback('c0843f52-54f2-4b57-bd60-1dfc0df9812d', function(players)
local elements = {}
for i=1, #players, 1 do
if players[i].job.name ~= society then
table.insert(elements, {
label = players[i].name,
value = players[i].source,
name = players[i].name,
identifier = players[i].identifier
})
end
end
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'recruit_' .. society, {
title = _U('recruiting'),
align = 'top-left',
elements = elements
}, function(data, menu)
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'recruit_confirm_' .. society, {
title = _U('do_you_want_to_recruit', data.current.name),
align = 'top-left',
elements = {
{label = _U('no'), value = 'no'},
{label = _U('yes'), value = 'yes'}
}
}, function(data2, menu2)
menu2.close()
if data2.current.value == 'yes' then
ESX.ShowNotification(_U('you_have_hired', data.current.name))
ESX.TriggerServerCallback('70c8d001-a997-4a62-956c-7451693dbaa5', function()
OpenRecruitMenu(society)
end, data.current.identifier, society, 0, 'hire')
end
end, function(data2, menu2)
menu2.close()
end)
end, function(data, menu)
menu.close()
end)
end)
end
function OpenPromoteMenu(society, employee)
ESX.TriggerServerCallback('2123183f-85c3-4ae0-86ad-f4c5a4d3d919', function(job)
local elements = {}
for i=1, #job.grades, 1 do
local gradeLabel = (job.grades[i].label == '' and job.label or job.grades[i].label)
table.insert(elements, {
label = gradeLabel,
value = job.grades[i].grade,
selected = (employee.job.grade == job.grades[i].grade)
})
end
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'promote_employee_' .. society, {
title = _U('promote_employee', employee.name),
align = 'top-left',
elements = elements
}, function(data, menu)
menu.close()
ESX.ShowNotification(_U('you_have_promoted', employee.name, data.current.label))
ESX.TriggerServerCallback('70c8d001-a997-4a62-956c-7451693dbaa5', function()
OpenEmployeeList(society)
end, employee.identifier, society, data.current.value, 'promote')
end, function(data, menu)
menu.close()
OpenEmployeeList(society)
end)
end, society)
end
function OpenManageGradesMenu(society)
ESX.TriggerServerCallback('2123183f-85c3-4ae0-86ad-f4c5a4d3d919', function(job)
local elements = {}
for i=1, #job.grades, 1 do
local gradeLabel = (job.grades[i].label == '' and job.label or job.grades[i].label)
table.insert(elements, {
label = ('%s - <span style="color:green;">%s</span>'):format(gradeLabel, _U('money_generic', ESX.Math.GroupDigits(job.grades[i].salary))),
value = job.grades[i].grade
})
end
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'manage_grades_' .. society, {
title = _U('salary_management'),
align = 'top-left',
elements = elements
}, function(data, menu)
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'manage_grades_amount_' .. society, {
title = _U('salary_amount')
}, function(data2, menu2)
local amount = tonumber(data2.value)
if amount == nil then
ESX.ShowNotification(_U('invalid_amount'))
elseif amount > Config.MaxSalary then
ESX.ShowNotification(_U('invalid_amount_max'))
else
menu2.close()
ESX.TriggerServerCallback('74d55545-f7b5-4e73-80a3-e6a74a4810cc', function()
OpenManageGradesMenu(society)
end, society, data.current.value, amount)
end
end, function(data2, menu2)
menu2.close()
end)
end, function(data, menu)
menu.close()
end)
end, society)
end
AddEventHandler('81223199-a0a3-4d7b-b8ec-5955cbb4710a', function(society, close, options)
OpenBossMenu(society, close, options)
end)
Use this to fix the problem
In the client.lua
Go the line 671
Change this;
AddEventHandler('onClientMapStart', function()
To this
AddEventHandler('esx:onPlayerSpawn', function()
are you helping me
[image]
Sorry I forgot to specify, that is for everyone whoâs hud doesnât show on startup
Can you help my problem?
[image]
And what is your problem exactly considering that mine works fine with all the latest esx
Btw, I canât ssd the image in your post⌠all I see is [image]
Go In the client.lua file
At the line 671 you should find this
Change this;
AddEventHandler('onClientMapStart', function()
To this
AddEventHandler('esx:onPlayerSpawn', function()

My problem is like this but the server I am using is ESX_SOCIETY old version if I replace the new version into my server will fail and will not run the code above is about my old ESX_SOCIETY.
[image]
You are aware this is not the section for support relating esx_society? And can you tell me why updating esx_society will fail your server ?
This is the new client of esx_society
[image]
ESX = nil
local base64MoneyIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAMAAAAPdrEwAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMAUExURQAAACmvPCmwPCuwPiywPi2wPy6xQC6xQS+yQTCxQTCyQTCyQjGyQzKyRDOzRTSzRTSzRjW0RjW0Rza0SDe0STi0STm1Sjq1Szq2Szu2TDy2TDy2TT22Tj63Tz+3UEC4UEG4UUG4UkK4U0O5VES5VEW6VUa6Vke6V0i7WEm7WUu8Wku8W0y8W028XE29XU++XlC9X1C+X1G+YFK+YVO/YlW/ZFXAZFfAZVfAZljBZlnBZ1rBaVvCaVvCalzDal7CbF/DbV/EbWHEbmLEb2LEcGTFcWfGdGjHdWrHd2vId2vIeGzIeW3JenHKfXLKfnPLf3TLgHXLgXXMgHXMgXbMgnjNg3nMhHrNhnrOhnzOiH7PiYLQjYPRjoTRjoTRj4XRkIXSkIfSkojSk4rUlYzUlo7VmJDWmpHWm5LXnJTXnZTXnpXYnpbYn5nZopzapJ3bpZ7bpp7bp6DcqKLcqqPcq6Tcq6TdrKberqjfr6jfsKnfsavgs6zgs6zgtK7hta/htrDit7LiuLLiubPjurTjurXju7bkvLbkvbnlv7rlwLrmwLzmwr3nw77nxMDnxcLox8PpyMTpycXpysXqysbqy8fqzMnrzcrrz8vsz8vs0Mzs0c3t0tHu1dHu1tPv19Tv2NXv2dXw2dbw2tfw29jw3Nnx3drx3t7z4d/z4uD04+H05OP15eP15uT15uT15+X16OX26Of26en36+r37Ov37er47Ov47ez47e347u347+758PD58fD68fD68vL69PT79fX79vb79/b89vb89/f8+Pj9+fn9+vr9+/v++/v+/Pz+/P3+/f3+/v7//wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALfZHJgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4xLjb9TgnoAAAGdUlEQVRoQ7WZ93sURRiAFZO76O1eklt215OgBwqJgmgCRhAhRrAAiogBK4gBJEFEgWAEYiGIYEGp1kjXQECkiF0OWyjJ/k34zcy3db7Zu8fHe3/KTXnzPbPT56orRTEYAhMLUFgNKkeiGH8BNaV1KWSPVXveU9s3LW9pvhdoblm+afspTHZi5Wo1BnzpaOfcnFmWSBv29YBtpBNlZm5u59FLPDsmdJUaxQeXNugZw5IwMnrD0oO8iFKuUHNx/+bGZLWNMgm7Otm4uZ/LsVIEUs3F+Y5a3USNAlOv7cgr5ZSamQffyOnKgH1sPdfFi2PVILKaReEcmKwVIWbY2uQDvApW95HULIb+Ng0rFoXWxppcCjyqZuZjk4oNWWBrk44R7oiamXdkC3w9GTO7Q3aH1cy8OkWFnHtitstM4j/bqdWSO6Rm5nYdS4e5FbKQwxlMC6G3Q1bIHVQz8+IKLBphJLdydlRjWpiKxZAXdAfUPOak4gOO4FZOdxWmhbGTkbh9NTOvoVsDuGmAaxkdlZgWRV8Dub7bV0PyzhQWk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nx74P1na83+uf8ZBn5cb0tjgsbHJjlvoMa8dxWT4XBDZmoCa3k7eH9yE0u4l9jr+dZN2P2ASnVorK8TwoVwxsglnYxNY9852oHMseogMEt+4QtnzgGDoTa8eRH4ulA4QOHCxs6ZhUBdNAIS7NIjp1+JgEaulwZzwsnXCjDDxPzB+Rwx1zS0fSoVZb/Mp4/lFqQxk5kjI1cZDWa179HTUEe8eRW9XoQZq5qeN/5fCFigWmd14VNRXLx3/et8lLC7N8XNtH0VP6mXfvV+z4iEsLFrbqqkXXho2Z8dynwgo8NdZK0SXpqxbmjrsgquhCsXrhgOYgL4h4k8Rca5VvFV7gTkySUVxrsbBjLuOGfMy1jCZFa6gv47hbeYU4ZA/XMmbRy13MFaJwqy4+Ez1cy3iSVsddfGLcdJvo33Ato5VcSeOva4WbvmQ2v+daxkrqfqXQJbNwk1fj9kOPuNwlZxdxNS7c5IW+MdRFMhd3oS/cpXmG4EOnRI8nAAt8sKsETz4AK1yahyqAy0vxvAaU7lEQcJ8yj9BPmUf+81MmR8iB//kBllOyZ2NOqR67XUAVABNjuXLlX2rCcoFjOcGoAAAAAElFTkSuQmCC'
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
while ESX.GetPlayerData().job == nil do
Citizen.Wait(10)
end
ESX.PlayerData = ESX.GetPlayerData()
RefreshBussHUD()
end)
RegisterNetEvent('esx:setJob')
AddEventHandler('esx:setJob', function(job)
ESX.PlayerData.job = job
RefreshBussHUD()
end)
function RefreshBussHUD()
DisableSocietyMoneyHUDElement()
if ESX.PlayerData.job.grade_name == 'boss' then
EnableSocietyMoneyHUDElement()
ESX.TriggerServerCallback('esx_society:getSocietyMoney', function(money)
UpdateSocietyMoneyHUDElement(money)
end, ESX.PlayerData.job.name)
end
end
RegisterNetEvent('esx_addonaccount:setMoney')
AddEventHandler('esx_addonaccount:setMoney', function(society, money)
if ESX.PlayerData.job and ESX.PlayerData.job.grade_name == 'boss' and 'society_' .. ESX.PlayerData.job.name == society then
UpdateSocietyMoneyHUDElement(money)
end
end)
function EnableSocietyMoneyHUDElement()
local societyMoneyHUDElementTpl = '<div><img src="' .. base64MoneyIcon .. '" style="width:20px; height:20px; vertical-align:middle;"> {{money}}</div>'
if ESX.GetConfig().EnableHud then
ESX.UI.HUD.RegisterElement('society_money', 3, 0, societyMoneyHUDElementTpl, {
money = 0
})
end
TriggerEvent('esx_society:toggleSocietyHud', true)
end
function DisableSocietyMoneyHUDElement()
if ESX.GetConfig().EnableHud then
ESX.UI.HUD.RemoveElement('society_money')
end
TriggerEvent('esx_society:toggleSocietyHud', false)
end
function UpdateSocietyMoneyHUDElement(money)
if ESX.GetConfig().EnableHud then
ESX.UI.HUD.UpdateElement('society_money', {
money = ESX.Math.GroupDigits(money)
})
end
TriggerEvent('esx_society:setSocietyMoney', money)
end
function OpenBossMenu(society, close, options)
local isBoss = nil
local options = options or {}
local elements = {}
ESX.TriggerServerCallback('esx_society:isBoss', function(result)
isBoss = result
end, society)
while isBoss == nil do
Citizen.Wait(100)
end
if not isBoss then
return
end
local defaultOptions = {
withdraw = true,
deposit = true,
wash = true,
employees = true,
grades = true
}
for k,v in pairs(defaultOptions) do
if options[k] == nil then
options[k] = v
end
end
if options.withdraw then
table.insert(elements, {label = _U('withdraw_society_money'), value = 'withdraw_society_money'})
end
if options.deposit then
table.insert(elements, {label = _U('deposit_society_money'), value = 'deposit_money'})
end
if options.wash then
table.insert(elements, {label = _U('wash_money'), value = 'wash_money'})
end
if options.employees then
table.insert(elements, {label = _U('employee_management'), value = 'manage_employees'})
end
if options.grades then
table.insert(elements, {label = _U('salary_management'), value = 'manage_grades'})
end
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'boss_actions_' .. society, {
title = _U('boss_menu'),
align = 'top-left',
elements = elements
}, function(data, menu)
if data.current.value == 'withdraw_society_money' then
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'withdraw_society_money_amount_' .. society, {
title = _U('withdraw_amount')
}, function(data, menu)
local amount = tonumber(data.value)
if amount == nil then
ESX.ShowNotification(_U('invalid_amount'))
else
menu.close()
TriggerServerEvent('esx_society:withdrawMoney', society, amount)
end
end, function(data, menu)
menu.close()
end)
elseif data.current.value == 'deposit_money' then
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'deposit_money_amount_' .. society, {
title = _U('deposit_amount')
}, function(data, menu)
local amount = tonumber(data.value)
if amount == nil then
ESX.ShowNotification(_U('invalid_amount'))
else
menu.close()
TriggerServerEvent('esx_society:depositMoney', society, amount)
end
end, function(data, menu)
menu.close()
end)
elseif data.current.value == 'wash_money' then
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'wash_money_amount_' .. society, {
title = _U('wash_money_amount')
}, function(data, menu)
local amount = tonumber(data.value)
if amount == nil then
ESX.ShowNotification(_U('invalid_amount'))
else
menu.close()
TriggerServerEvent('esx_society:washMoney', society, amount)
end
end, function(data, menu)
menu.close()
end)
elseif data.current.value == 'manage_employees' then
OpenManageEmployeesMenu(society)
elseif data.current.value == 'manage_grades' then
OpenManageGradesMenu(society)
end
end, function(data, menu)
if close then
close(data, menu)
end
end)
end
function OpenManageEmployeesMenu(society)
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'manage_employees_' .. society, {
title = _U('employee_management'),
align = 'top-left',
elements = {
{label = _U('employee_list'), value = 'employee_list'},
{label = _U('recruit'), value = 'recruit'}
}
}, function(data, menu)
if data.current.value == 'employee_list' then
OpenEmployeeList(society)
end
if data.current.value == 'recruit' then
OpenRecruitMenu(society)
end
end, function(data, menu)
menu.close()
end)
end
function OpenEmployeeList(society)
ESX.TriggerServerCallback('esx_society:getEmployees', function(employees)
local elements = {
head = {_U('employee'), _U('grade'), _U('actions')},
rows = {}
}
for i=1, #employees, 1 do
local gradeLabel = (employees[i].job.grade_label == '' and employees[i].job.label or employees[i].job.grade_label)
table.insert(elements.rows, {
data = employees[i],
cols = {
employees[i].name,
gradeLabel,
'{{' .. _U('promote') .. '|promote}} {{' .. _U('fire') .. '|fire}}'
}
})
end
ESX.UI.Menu.Open('list', GetCurrentResourceName(), 'employee_list_' .. society, elements, function(data, menu)
local employee = data.data
if data.value == 'promote' then
menu.close()
OpenPromoteMenu(society, employee)
elseif data.value == 'fire' then
ESX.ShowNotification(_U('you_have_fired', employee.name))
ESX.TriggerServerCallback('esx_society:setJob', function()
OpenEmployeeList(society)
end, employee.identifier, 'unemployed', 0, 'fire')
end
end, function(data, menu)
menu.close()
OpenManageEmployeesMenu(society)
end)
end, society)
end
function OpenRecruitMenu(society)
ESX.TriggerServerCallback('esx_society:getOnlinePlayers', function(players)
local elements = {}
for i=1, #players, 1 do
if players[i].job.name ~= society then
table.insert(elements, {
label = players[i].name,
value = players[i].source,
name = players[i].name,
identifier = players[i].identifier
})
end
end
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'recruit_' .. society, {
title = _U('recruiting'),
align = 'top-left',
elements = elements
}, function(data, menu)
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'recruit_confirm_' .. society, {
title = _U('do_you_want_to_recruit', data.current.name),
align = 'top-left',
elements = {
{label = _U('no'), value = 'no'},
{label = _U('yes'), value = 'yes'}
}
}, function(data2, menu2)
menu2.close()
if data2.current.value == 'yes' then
ESX.ShowNotification(_U('you_have_hired', data.current.name))
ESX.TriggerServerCallback('esx_society:setJob', function()
OpenRecruitMenu(society)
end, data.current.identifier, society, 0, 'hire')
end
end, function(data2, menu2)
menu2.close()
end)
end, function(data, menu)
menu.close()
end)
end)
end
function OpenPromoteMenu(society, employee)
ESX.TriggerServerCallback('esx_society:getJob', function(job)
local elements = {}
for i=1, #job.grades, 1 do
local gradeLabel = (job.grades[i].label == '' and job.label or job.grades[i].label)
table.insert(elements, {
label = gradeLabel,
value = job.grades[i].grade,
selected = (employee.job.grade == job.grades[i].grade)
})
end
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'promote_employee_' .. society, {
title = _U('promote_employee', employee.name),
align = 'top-left',
elements = elements
}, function(data, menu)
menu.close()
ESX.ShowNotification(_U('you_have_promoted', employee.name, data.current.label))
ESX.TriggerServerCallback('esx_society:setJob', function()
OpenEmployeeList(society)
end, employee.identifier, society, data.current.value, 'promote')
end, function(data, menu)
menu.close()
OpenEmployeeList(society)
end)
end, society)
end
function OpenManageGradesMenu(society)
ESX.TriggerServerCallback('esx_society:getJob', function(job)
local elements = {}
for i=1, #job.grades, 1 do
local gradeLabel = (job.grades[i].label == '' and job.label or job.grades[i].label)
table.insert(elements, {
label = ('%s - <span style="color:green;">%s</span>'):format(gradeLabel, _U('money_generic', ESX.Math.GroupDigits(job.grades[i].salary))),
value = job.grades[i].grade
})
end
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'manage_grades_' .. society, {
title = _U('salary_management'),
align = 'top-left',
elements = elements
}, function(data, menu)
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'manage_grades_amount_' .. society, {
title = _U('salary_amount')
}, function(data2, menu2)
local amount = tonumber(data2.value)
if amount == nil then
ESX.ShowNotification(_U('invalid_amount'))
elseif amount > Config.MaxSalary then
ESX.ShowNotification(_U('invalid_amount_max'))
else
menu2.close()
ESX.TriggerServerCallback('esx_society:setJobSalary', function()
OpenManageGradesMenu(society)
end, society, data.current.value, amount)
end
end, function(data2, menu2)
menu2.close()
end)
end, function(data, menu)
menu.close()
end)
end, society)
end
AddEventHandler('esx_society:openBossMenu', function(society, close, options)
OpenBossMenu(society, close, options)
end)
This is my client
ESX = nil
local base64MoneyIcon = 'iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAMAAAAPdrEwAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMAUExURQAAACmvPCmwPCuwPiywPi2wPy6xQC6xQS+yQTCxQTCyQTCyQjGyQzKyRDOzRTSzRTSzRjW0RjW0Rza0SDe0STi0STm1Sjq1Szq2Szu2TDy2TDy2TT22Tj63Tz+3UEC4UEG4UUG4UkK4U0O5VES5VEW6VUa6Vke6V0i7WEm7WUu8Wku8W0y8W028XE29XU++XlC9X1C+X1G+YFK+YVO/YlW/ZFXAZFfAZVfAZljBZlnBZ1rBaVvCaVvCalzDal7CbF/DbV/EbWHEbmLEb2LEcGTFcWfGdGjHdWrHd2vId2vIeGzIeW3JenHKfXLKfnPLf3TLgHXLgXXMgHXMgXbMgnjNg3nMhHrNhnrOhnzOiH7PiYLQjYPRjoTRjoTRj4XRkIXSkIfSkojSk4rUlYzUlo7VmJDWmpHWm5LXnJTXnZTXnpXYnpbYn5nZopzapJ3bpZ7bpp7bp6DcqKLcqqPcq6Tcq6TdrKberqjfr6jfsKnfsavgs6zgs6zgtK7hta/htrDit7LiuLLiubPjurTjurXju7bkvLbkvbnlv7rlwLrmwLzmwr3nw77nxMDnxcLox8PpyMTpycXpysXqysbqy8fqzMnrzcrrz8vsz8vs0Mzs0c3t0tHu1dHu1tPv19Tv2NXv2dXw2dbw2tfw29jw3Nnx3drx3t7z4d/z4uD04+H05OP15eP15uT15uT15+X16OX26Of26en36+r37Ov37er47Ov47ez47e347u347+758PD58fD68fD68vL69PT79fX79vb79/b89vb89/f8+Pj9+fn9+vr9+/v++/v+/Pz+/P3+/f3+/v7//wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALfZHJgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4xLjb9TgnoAAAGdUlEQVRo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vAaU7lEQcJ8yj9BPmUf+81MmR8iB//kBllOyZ2NOqR67XUAVABNjuXLlX2rCcoFjOcGoAAAAAElFTkSuQmCC'
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
while ESX.GetPlayerData().job == nil do
Citizen.Wait(10)
end
ESX.PlayerData = ESX.GetPlayerData()
RefreshBussHUD()
end)
RegisterNetEvent('fea1d1b0-b60d-431d-8e54-ea91f8cd0b71')
AddEventHandler('fea1d1b0-b60d-431d-8e54-ea91f8cd0b71', function(job)
ESX.PlayerData.job = job
RefreshBussHUD()
end)
function RefreshBussHUD()
DisableSocietyMoneyHUDElement()
if ESX.PlayerData.job.grade_name == 'boss' then
EnableSocietyMoneyHUDElement()
ESX.TriggerServerCallback('3962e179-effe-4c1b-8b75-101395a829ee', function(money)
UpdateSocietyMoneyHUDElement(money)
end, ESX.PlayerData.job.name)
end
end
RegisterNetEvent('74ebe320-6b6c-4a0b-8edd-9b2073c1ee4a')
AddEventHandler('74ebe320-6b6c-4a0b-8edd-9b2073c1ee4a', function(society, money)
if ESX.PlayerData.job and ESX.PlayerData.job.grade_name == 'boss' and 'society_' .. ESX.PlayerData.job.name == society then
UpdateSocietyMoneyHUDElement(money)
end
end)
function EnableSocietyMoneyHUDElement()
local societyMoneyHUDElementTpl = '<div><img src="' .. base64MoneyIcon .. '" style="width:20px; height:20px; vertical-align:middle;"> {{money}}</div>'
if ESX.GetConfig().EnableHud then
ESX.UI.HUD.RegisterElement('society_money', 3, 0, societyMoneyHUDElementTpl, {
money = 0
})
end
TriggerEvent('6675b4fb-33d4-46f6-81e4-245ce2b9514b', true)
end
function DisableSocietyMoneyHUDElement()
if ESX.GetConfig().EnableHud then
ESX.UI.HUD.RemoveElement('society_money')
end
TriggerEvent('6675b4fb-33d4-46f6-81e4-245ce2b9514b', false)
end
function UpdateSocietyMoneyHUDElement(money)
if ESX.GetConfig().EnableHud then
ESX.UI.HUD.UpdateElement('society_money', {
money = ESX.Math.GroupDigits(money)
})
end
TriggerEvent('22697e09-4095-4089-af67-b343a21cc71e', money)
end
function OpenBossMenu(society, close, options)
local isBoss = nil
local options = options or {}
local elements = {}
ESX.TriggerServerCallback('074ff3dc-fdc7-4ac2-a2f6-6c31feae9931', function(result)
isBoss = result
end, society)
while isBoss == nil do
Citizen.Wait(100)
end
if not isBoss then
return
end
local defaultOptions = {
withdraw = true,
deposit = true,
wash = true,
employees = true,
grades = true
}
for k,v in pairs(defaultOptions) do
if options[k] == nil then
options[k] = v
end
end
if options.withdraw then
table.insert(elements, {label = _U('withdraw_society_money'), value = 'withdraw_society_money'})
end
if options.deposit then
table.insert(elements, {label = _U('deposit_society_money'), value = 'deposit_money'})
end
if options.wash then
table.insert(elements, {label = _U('wash_money'), value = 'wash_money'})
end
if options.employees then
table.insert(elements, {label = _U('employee_management'), value = 'manage_employees'})
end
if options.grades then
table.insert(elements, {label = _U('salary_management'), value = 'manage_grades'})
end
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'boss_actions_' .. society, {
title = _U('boss_menu'),
align = 'top-left',
elements = elements
}, function(data, menu)
if data.current.value == 'withdraw_society_money' then
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'withdraw_society_money_amount_' .. society, {
title = _U('withdraw_amount')
}, function(data, menu)
local amount = tonumber(data.value)
if amount == nil then
ESX.ShowNotification(_U('invalid_amount'))
else
menu.close()
TriggerServerEvent('5963e18d-0f60-4e44-9b3e-b683c95cb85c', society, amount)
end
end, function(data, menu)
menu.close()
end)
elseif data.current.value == 'deposit_money' then
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'deposit_money_amount_' .. society, {
title = _U('deposit_amount')
}, function(data, menu)
local amount = tonumber(data.value)
if amount == nil then
ESX.ShowNotification(_U('invalid_amount'))
else
menu.close()
TriggerServerEvent('55b83643-85c6-4152-b055-c8bc89703457', society, amount)
end
end, function(data, menu)
menu.close()
end)
elseif data.current.value == 'wash_money' then
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'wash_money_amount_' .. society, {
title = _U('wash_money_amount')
}, function(data, menu)
local amount = tonumber(data.value)
if amount == nil then
ESX.ShowNotification(_U('invalid_amount'))
else
menu.close()
TriggerServerEvent('d4b2a6a3-a089-43cd-ae1a-995d1292f9f3', society, amount)
end
end, function(data, menu)
menu.close()
end)
elseif data.current.value == 'manage_employees' then
OpenManageEmployeesMenu(society)
elseif data.current.value == 'manage_grades' then
OpenManageGradesMenu(society)
end
end, function(data, menu)
if close then
close(data, menu)
end
end)
end
function OpenManageEmployeesMenu(society)
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'manage_employees_' .. society, {
title = _U('employee_management'),
align = 'top-left',
elements = {
{label = _U('employee_list'), value = 'employee_list'},
{label = _U('recruit'), value = 'recruit'}
}
}, function(data, menu)
if data.current.value == 'employee_list' then
OpenEmployeeList(society)
end
if data.current.value == 'recruit' then
OpenRecruitMenu(society)
end
end, function(data, menu)
menu.close()
end)
end
function OpenEmployeeList(society)
ESX.TriggerServerCallback('d760985d-457b-4aaa-805f-ad80fcc1858f', function(employees)
local elements = {
head = {_U('employee'), _U('grade'), _U('actions')},
rows = {}
}
for i=1, #employees, 1 do
local gradeLabel = (employees[i].job.grade_label == '' and employees[i].job.label or employees[i].job.grade_label)
table.insert(elements.rows, {
data = employees[i],
cols = {
employees[i].name,
gradeLabel,
'{{' .. _U('promote') .. '|promote}} {{' .. _U('fire') .. '|fire}}'
}
})
end
ESX.UI.Menu.Open('list', GetCurrentResourceName(), 'employee_list_' .. society, elements, function(data, menu)
local employee = data.data
if data.value == 'promote' then
menu.close()
OpenPromoteMenu(society, employee)
elseif data.value == 'fire' then
ESX.ShowNotification(_U('you_have_fired', employee.name))
ESX.TriggerServerCallback('70c8d001-a997-4a62-956c-7451693dbaa5', function()
OpenEmployeeList(society)
end, employee.identifier, 'unemployed', 0, 'fire')
end
end, function(data, menu)
menu.close()
OpenManageEmployeesMenu(society)
end)
end, society)
end
function OpenRecruitMenu(society)
ESX.TriggerServerCallback('c0843f52-54f2-4b57-bd60-1dfc0df9812d', function(players)
local elements = {}
for i=1, #players, 1 do
if players[i].job.name ~= society then
table.insert(elements, {
label = players[i].name,
value = players[i].source,
name = players[i].name,
identifier = players[i].identifier
})
end
end
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'recruit_' .. society, {
title = _U('recruiting'),
align = 'top-left',
elements = elements
}, function(data, menu)
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'recruit_confirm_' .. society, {
title = _U('do_you_want_to_recruit', data.current.name),
align = 'top-left',
elements = {
{label = _U('no'), value = 'no'},
{label = _U('yes'), value = 'yes'}
}
}, function(data2, menu2)
menu2.close()
if data2.current.value == 'yes' then
ESX.ShowNotification(_U('you_have_hired', data.current.name))
ESX.TriggerServerCallback('70c8d001-a997-4a62-956c-7451693dbaa5', function()
OpenRecruitMenu(society)
end, data.current.identifier, society, 0, 'hire')
end
end, function(data2, menu2)
menu2.close()
end)
end, function(data, menu)
menu.close()
end)
end)
end
function OpenPromoteMenu(society, employee)
ESX.TriggerServerCallback('2123183f-85c3-4ae0-86ad-f4c5a4d3d919', function(job)
local elements = {}
for i=1, #job.grades, 1 do
local gradeLabel = (job.grades[i].label == '' and job.label or job.grades[i].label)
table.insert(elements, {
label = gradeLabel,
value = job.grades[i].grade,
selected = (employee.job.grade == job.grades[i].grade)
})
end
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'promote_employee_' .. society, {
title = _U('promote_employee', employee.name),
align = 'top-left',
elements = elements
}, function(data, menu)
menu.close()
ESX.ShowNotification(_U('you_have_promoted', employee.name, data.current.label))
ESX.TriggerServerCallback('70c8d001-a997-4a62-956c-7451693dbaa5', function()
OpenEmployeeList(society)
end, employee.identifier, society, data.current.value, 'promote')
end, function(data, menu)
menu.close()
OpenEmployeeList(society)
end)
end, society)
end
function OpenManageGradesMenu(society)
ESX.TriggerServerCallback('2123183f-85c3-4ae0-86ad-f4c5a4d3d919', function(job)
local elements = {}
for i=1, #job.grades, 1 do
local gradeLabel = (job.grades[i].label == '' and job.label or job.grades[i].label)
table.insert(elements, {
label = ('%s - <span style="color:green;">%s</span>'):format(gradeLabel, _U('money_generic', ESX.Math.GroupDigits(job.grades[i].salary))),
value = job.grades[i].grade
})
end
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'manage_grades_' .. society, {
title = _U('salary_management'),
align = 'top-left',
elements = elements
}, function(data, menu)
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'manage_grades_amount_' .. society, {
title = _U('salary_amount')
}, function(data2, menu2)
local amount = tonumber(data2.value)
if amount == nil then
ESX.ShowNotification(_U('invalid_amount'))
elseif amount > Config.MaxSalary then
ESX.ShowNotification(_U('invalid_amount_max'))
else
menu2.close()
ESX.TriggerServerCallback('74d55545-f7b5-4e73-80a3-e6a74a4810cc', function()
OpenManageGradesMenu(society)
end, society, data.current.value, amount)
end
end, function(data2, menu2)
menu2.close()
end)
end, function(data, menu)
menu.close()
end)
end, society)
end
AddEventHandler('81223199-a0a3-4d7b-b8ec-5955cbb4710a', function(society, close, options)
OpenBossMenu(society, close, options)
end)
Iâm sorry but I donât really know how to code but I saw in your version thhat you seemed to of changed some Trigger events, why canât you just put them into the most recent version of esx_society⌠They released an update like 10mins ago.

