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
+12
View File
@@ -65,6 +65,13 @@ ESX.ShowNotification = function(msg)
DrawNotification(0,1)
end
ESX.ShowAdvancedNotification = function(title, subject, msg, icon, iconType)
SetNotificationTextEntry('STRING')
AddTextComponentString(msg)
SetNotificationMessage(icon, icon, false, iconType, title, subject)
DrawNotification(false, false)
end
ESX.TriggerServerCallback = function(name, cb, ...)
ESX.ServerCallbacks[ESX.CurrentRequestId] = cb
@@ -1394,6 +1401,11 @@ AddEventHandler('esx:showNotification', function(msg)
ESX.ShowNotification(msg)
end)
RegisterNetEvent('esx:showAdvancedNotification')
AddEventHandler('esx:showAdvancedNotification', function(title, subject, msg, icon, iconType)
ESX.ShowAdvancedNotification(title, subject, msg, icon, iconType)
end)
-- SetTimeout
Citizen.CreateThread(function()
while true do