mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 21:01:31 +00:00
chore(ux): add some notifications
This commit is contained in:
+9
-1
@@ -149,10 +149,18 @@ ESX.RegisterServerCallback('esx_society:getJob', function(source, cb, society)
|
||||
end)
|
||||
|
||||
|
||||
ESX.RegisterServerCallback('esx_society:setJob', function(source, cb, identifier, job, grade)
|
||||
ESX.RegisterServerCallback('esx_society:setJob', function(source, cb, identifier, job, grade, type)
|
||||
|
||||
local xPlayer = ESX.GetPlayerFromIdentifier(identifier)
|
||||
|
||||
if type == 'hire' then
|
||||
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('you_have_been_hired', job))
|
||||
elseif type == 'promote' then
|
||||
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('you_have_been_promoted'))
|
||||
elseif type == 'fire' then
|
||||
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('you_have_been_fired', xPlayer.getJob().label))
|
||||
end
|
||||
|
||||
if xPlayer ~= nil then
|
||||
xPlayer.setJob(job, grade)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user