chore(ux): add some notifications

This commit is contained in:
Romain Lanz
2017-09-03 15:46:40 +02:00
parent b92f0ffebd
commit 0442ee2c55
3 changed files with 24 additions and 4 deletions
+9 -1
View File
@@ -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