82 lines
		
	
	
		
			No EOL
		
	
	
		
			3.4 KiB
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			82 lines
		
	
	
		
			No EOL
		
	
	
		
			3.4 KiB
		
	
	
	
		
			Lua
		
	
	
	
	
	
Notifyx = {
 | 
						|
 | 
						|
    DoTextui = function(text)
 | 
						|
        local _type = ScriptUtility.Utility.TextUI
 | 
						|
        if _type == 'ox' then
 | 
						|
            return lib.showTextUI(text.msg)
 | 
						|
            --an example
 | 
						|
            --lib.showTextUI(text.msg, {position = text.position,icon = text.icon,})
 | 
						|
        elseif _type == 'jg' then
 | 
						|
            return exports['jg-textui']:DrawText(text.msg)
 | 
						|
        elseif _type == 'qb' then
 | 
						|
            return exports['qb-core']:DrawText(text.msg, text.position)
 | 
						|
        elseif _type == 'cd' then
 | 
						|
            return TriggerEvent('cd_drawtextui:ShowUI', 'show', text.msg)
 | 
						|
        elseif _type == 'lab' then
 | 
						|
            return exports['lab-HintUI']:Show(text.msg)
 | 
						|
        elseif _type == 'custom' then
 | 
						|
            --do stuff here
 | 
						|
        end
 | 
						|
    end,
 | 
						|
 | 
						|
    RemoveTextui = function()
 | 
						|
        local _type = ScriptUtility.Utility.TextUI
 | 
						|
        if _type == 'ox' then
 | 
						|
            return lib.hideTextUI()
 | 
						|
        elseif _type == 'jg' then
 | 
						|
            return exports['jg-textui']:HideText()
 | 
						|
        elseif _type == 'qb' then
 | 
						|
            return exports['qb-core']:HideText()
 | 
						|
        elseif _type == 'cd' then
 | 
						|
            return TriggerEvent('cd_drawtextui:HideUI')
 | 
						|
        elseif _type == 'lab' then
 | 
						|
            return exports['lab-HintUI']:Hide()
 | 
						|
        elseif _type == 'custom' then
 | 
						|
            --do stuff here
 | 
						|
        end
 | 
						|
    end,
 | 
						|
 | 
						|
    NotifyPlayer = function(message)
 | 
						|
        -- ty crowley for the idea
 | 
						|
        local _type = ScriptUtility.Utility.Notify
 | 
						|
        if _type == 'ox' then
 | 
						|
            return lib.notify({ title = message.title, description = message.msg, duration = message.timeout, type = message.status, icon = message.icon})
 | 
						|
        elseif _type == 'mythic' then
 | 
						|
            return exports['mythic_notify']:SendAlert(message.status, message.msg)
 | 
						|
        elseif _type == 'old_mythic' then
 | 
						|
            return exports['mythic_notify']:DoHudText(message.status, message.msg)
 | 
						|
        elseif _type == 'pNotify' then
 | 
						|
            return exports.pNotify:SendNotification({text = message.msg, type = message.status, timeout = message.timeout})
 | 
						|
        elseif _type == 'brutal' then
 | 
						|
            return exports['brutal_notify']:SendAlert( message.title, message.msg, message.timeout, message.status)
 | 
						|
        elseif _type == 'okok' then
 | 
						|
            return exports['okokNotify']:Alert(message.title, message.msg, message.timeout, message.status, false)
 | 
						|
        elseif _type == 'sd' then
 | 
						|
            return exports['sd-notify']:Notify(message.title, message.msg, message.timeout, message.status, message.position, false, false)
 | 
						|
        elseif _type == 'wasabi' then
 | 
						|
            return exports.wasabi_notify:notify(message.status, message.msg, message.timeout, message.status)
 | 
						|
        elseif _type == 'qb' then
 | 
						|
            return TriggerEvent('QBCore:Notify', message.msg, message.status, message.timeout)
 | 
						|
        elseif _type == 'esx' then
 | 
						|
            return TriggerEvent('esx:showNotification', message.msg)
 | 
						|
        elseif _type == 'custom' then
 | 
						|
            -- add your custom notification here
 | 
						|
        end
 | 
						|
    end,
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
HuntingUtil = {
 | 
						|
    setVehicleFuel = function(veh)
 | 
						|
        local _type = ScriptUtility.Utility.FuelSystem
 | 
						|
        SetVehicleFuelLevel(veh, 100.0)
 | 
						|
        if _type == 'ox_fuel' then
 | 
						|
            Entity(veh).state.fuel = 100.0
 | 
						|
            return true
 | 
						|
        elseif _type == 'LegacyFuel' then
 | 
						|
            return exports['LegacyFuel']:SetFuel(veh, 100.0)
 | 
						|
        elseif _type == 'custom' then
 | 
						|
             return exports['lc_fuel']:SetFuel(veh, 100.0)
 | 
						|
        end
 | 
						|
    end,
 | 
						|
} |