From 82bfc7726efcaae41b5fa3590ea794e5c87fc70c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Horv=C3=A1th=20Gell=C3=A9rt?= Date: Sat, 26 Nov 2022 21:46:15 +0100 Subject: [PATCH] #575 esx_society refactor and fix notify issues --- [esx_addons]/esx_society/server/main.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/[esx_addons]/esx_society/server/main.lua b/[esx_addons]/esx_society/server/main.lua index a88d7f2c..be5e0d3d 100644 --- a/[esx_addons]/esx_society/server/main.lua +++ b/[esx_addons]/esx_society/server/main.lua @@ -287,7 +287,7 @@ ESX.RegisterServerCallback('esx_society:getJob', function(source, cb, society) cb(job) end) -ESX.RegisterServerCallback('esx_society:setJob', function(source, cb, identifier, job, grade, type) +ESX.RegisterServerCallback('esx_society:setJob', function(source, cb, identifier, job, grade, actionType) local xPlayer = ESX.GetPlayerFromId(source) local isBoss = xPlayer.job.grade_name == 'boss' local xTarget = ESX.GetPlayerFromIdentifier(identifier) @@ -297,13 +297,13 @@ ESX.RegisterServerCallback('esx_society:setJob', function(source, cb, identifier if xTarget then xTarget.setJob(job, grade) - if type == 'hire' then + if actionType == 'hire' then xTarget.showNotification(TranslateCap('you_have_been_hired', job)) xPlayer.showNotification(TranslateCap("you_have_hired", xTarget.getName())) - elseif type == 'promote' then + elseif actionType == 'promote' then xTarget.showNotification(TranslateCap('you_have_been_promoted')) - xPlayer.showNotification(TranslateCap("you_have_promoted", xTarget.getName())) - elseif type == 'fire' then + xPlayer.showNotification(TranslateCap("you_have_promoted", xTarget.getName(), xTarget.getJob().label)) + elseif actionType == 'fire' then xTarget.showNotification(TranslateCap('you_have_been_fired', xTarget.getJob().label)) xPlayer.showNotification(TranslateCap("you_have_fired", xTarget.getName())) end