📄Functions

ESX = exports.es_extended:getSharedObject()

function Notify(msg, type, time)
    if Config.Notify == "okok" then
        exports['okokNotify']:Alert('Trucker', msg, time, type, true)
    elseif Config.Notify == "ox" then
        lib.notify({ title = 'Trucker', description = msg, type = type })
    end
end

function SendHelpText(msg, position)
    lib.showTextUI(msg)
end

function RemoveHelpText()
    lib.hideTextUI()
end

function GiveKeys(veh)
    local plate = GetVehicleNumberPlateText(veh)
    local model = GetDisplayNameFromVehicleModel(GetEntityModel(veh))
    if Config.VehicleKeys == "qs" then
        exports['qs-vehiclekeys']:GiveKeys(plate, model)
    elseif Config.VehicleKeys == "renewed" then
        exports['Renewed-Vehiclekeys']:addKey(plate)
    elseif Config.VehicleKeys == "none" then
        
    end
end

function SetFuel(veh)
    if Config.Fuel == "LegacyFuel" then
        exports["LegacyFuel"]:SetFuel(veh, 100.0)
    elseif Config.Fuel == "okokFuel" then
        exports['okokGasStation']:SetFuel(veh, 100.0)
    elseif Config.Fuel == "ox_fuel" then
        SetVehicleFuelLevel(veh, 100.0)
    elseif Config.Fuel == "ti_fuel" then
        exports["ti_fuel"]:setFuel(veh, 100.0, "RON91")
    elseif Config.Fuel == "qs-fuel" then
        exports['qs-fuelstations']:SetFuel(veh, 100.0)
    end
end

Last updated