Improved paycheck system, added advanced notifications, see desc

- Improved paycheck system
    - we now take society money if there is any, or else the employees wont get a salary at all
    - now using ESX.ShowAdvancedNotifications
This commit is contained in:
ElPumpo
2018-05-11 13:57:35 +02:00
parent 987a40bf0d
commit 66e7eceddf
14 changed files with 137 additions and 395 deletions
+10 -2
View File
@@ -17,8 +17,16 @@ end, function(source, args, user)
end, {help = "Teleport to coordinates", params = {{name = "x", help = "X coords"}, {name = "y", help = "Y coords"}, {name = "z", help = "Z coords"}}})
TriggerEvent('es:addGroupCommand', 'setjob', 'jobmaster', function(source, args, user)
local xPlayer = ESX.GetPlayerFromId(args[1])
xPlayer.setJob(args[2], tonumber(args[3]))
if tonumber(args[1]) and args[2] and tonumber(args[3]) then
local xPlayer = ESX.GetPlayerFromId(args[1])
if xPlayer ~= nil then
xPlayer.setJob(args[2], args[3])
else
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Player not online.")
end
else
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Invalid usage.")
end
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficient Permissions.")
end, {help = _U('setjob'), params = {{name = "id", help = _U('id_param')}, {name = "job", help = _U('setjob_param2')}, {name = "grade_id", help = _U('setjob_param3')}}})