Files
Elite-Gaming-FiveM/resources/ebu_flagger/client/utils.lua
T
2025-02-17 01:04:14 -08:00

66 lines
2.1 KiB
Lua

-- Use this function for job locking. If the job is correct, return true.
-- Please refer to your framework's job system for how to implement, I do not support
-- job checking integration. -Theebu
function allowed()
return true
end
Notifications = {}
Notifications.Language = {
['SNGL_ADDED'] = "Flagger ready",
['PAIRED_ADDED'] = "Flagger paired",
['PAIRED_REMOVED'] = "Paired Flagger removed",
['PAIRED_ERROR'] = "Flagger paired - Unpair to use",
['PAIRING'] = "Pairing Flagger - Choose 2nd device",
['SNGL_ERROR'] = 'Flagger already set up',
['START_PAIRED'] = "Paired Flaggers starting",
['PAUSE_PAIRED'] = "Paired Flaggers paused",
['STOP_PAIRED'] = "Paired Flaggers stopped",
['START_SINGLE'] = "Single Flagger started",
['PAUSE_SINGLE'] = "Single Flagger paused",
['STOP_SINGLE'] = "Single Flagger stopped",
['NOT_RUNNING'] = "Device not running",
['NOT_CONFIGURED'] = "Device not configured",
--
['TYPE'] = 'Type',
['PAIRED'] = 'Paired',
['SINGLE'] = 'Single',
['TIMER'] = 'Timer',
['DELAY'] = 'Delay',
['ACTIVE'] = 'Active',
}
Notifications.SUCCESS = function(message)
EndTextCommandThefeedPostTickerForced(1,1)
ThefeedNextPostBackgroundColor(184)
BeginTextCommandThefeedPost("STRING")
AddTextComponentSubstringPlayerName(Notifications.Language[message])
EndTextCommandThefeedPostTicker(true, true)
Citizen.Wait(3000)
EndTextCommandThefeedPostTickerForced(1,1)
end
Notifications.ERROR = function(message)
EndTextCommandThefeedPostTickerForced(1,1)
ThefeedNextPostBackgroundColor(6)
BeginTextCommandThefeedPost("STRING")
AddTextComponentSubstringPlayerName(Notifications.Language[message])
EndTextCommandThefeedPostTicker(true, true)
Citizen.Wait(3000)
EndTextCommandThefeedPostTickerForced(1,1)
end
Notifications.INFO = function(message)
EndTextCommandThefeedPostTickerForced(1,1)
BeginTextCommandThefeedPost("STRING")
AddTextComponentSubstringPlayerName(Notifications.Language[message])
EndTextCommandThefeedPostTicker(true, true)
Citizen.Wait(3000)
EndTextCommandThefeedPostTickerForced(1,1)
end