[ESX] [FREE] FPS Menu

NEW FPS MENU 〉 [FREE] [ESX] FPS Menu V2

〉This menu is a script in Lua for FiveM servers that presents two options for adjusting the game’s FPS settings. The first option sets certain settings to increase the FPS of the game and the second option resets the FPS settings to their default values.

〉Este menú es un script en Lua para los servidores de FiveM que presenta dos opciones para ajustar la configuración de los FPS del juego. La primera opción configura ciertos valores para aumentar los FPS del juego y la segunda opción restablece las configuraciones de FPS a sus valores predeterminados.

Requires ‘es_extended’

Download > Github FPS MENU

Captura de pantalla 2023-03-02 163641

Code is accessible Yes
Subscription-based No
Lines (approximately) +70
Requirements Requirements es_extended
Support Yes
4 Likes

Cuando selecciono una de las opciones me aparece esto en la consola y no hace ningun cambio.

ooohhh nice work bro

same thing for us

Has cambiado algo del código ?

You need to have the latest version, for the menu to work well, I’m testing it now and the menu work.

I took the latest version and I still have the error

Send me a screenshot of the error

here is the screenshot

[image]

Try this, if it doesn’t I’ll look to fix it tomorrow, it seems strange to me that it worked for some people and not for others.

ESX = exports[“es_extended”]:getSharedObject()

local FPSConfig = {
pedstreaming_max_time = 0.1,
entitystreaming_max_time = 0,
lodscale = 2,
lodmult = 1.0,
ShadowDepthBias = 0.01,
ShadowNearClip = 0.01,
MaxLightsPerCluster = 50.0,
grass_quality = 5.0,
fxaa_quality = 3.0,
farclip = 2000.0,
particle_quality = 2.0,
shadow_quality = 5.0,
shadowsoftness = 1.0,
texture_quality = 2.0,
water_quality = 4.0,
water_wavelets = 0.0,
vehicledensity = 0.0,
vehiclestreaming_priority_multiplier = 0.0,
StreamingMaxVehicleCullDistanceScale = 0.0,
MaxVehicleCullDistance = 0.0
}

local OriginalConfig = {}

local MenuOption = {
{
name = “FPS ON”,
function = function()
– Save original config
for key, value in pairs(FPSConfig) do
OriginalConfig[key] = GetResourceKvpFloat(key) or 0.0
end

        -- Apply FPS config
        for key, value in pairs(FPSConfig) do
            SetResourceKvpFloat(key, value)
        end

        print("Performance options configured to increase FPS.")
    end
},
{
    name = "FPS OFF",
    function = function()
        -- Restore original config
        for key, value in pairs(OriginalConfig) do
            SetResourceKvpFloat(key, value)
        end

        ESX.ShowNotification("FPS settings restored to their default values.")
    end
}

}

while true do
    Citizen.Wait(0)
    if IsControlJustPressed(0, 168) then -- "F7" key to open the menu
        OpenMenu(MenuOption)
    end
end

end)

function OpenMenu(options)
local elements = {}
for _, option in ipairs(options) do
table.insert(elements, {label = option.name})
end

ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'menu', {
    title = 'FPS Menu',
    align = 'bottom-left',
    elements = elements
}, function(data, menu)
    local selectedOption = options[data.current.index]
    selectedOption.function()
end, function(data, menu)
    menu.close()
end)

end

I see several errors in the code I think

some "
– Save original config

and it doesn’t seem to work

I don’t understand why it doesn’t work, I’m literally testing it now and it works fine, tomorrow I’ll make another menu but much more complete and that it doesn’t have a single error.

no worries thank you very much

As I told you the other day, I just made a new fps boost menu, you can see it on my profile or just go to the same github link.