[Release][C#] Handling Editor

for some reason it won’t open at all, anyone know why?

for some reason it doesn save and idk why it changes in game but if i dv car or server crashes it doesnt save

Hello I am unable to get this to work. I have put it in my resources and started. it cant find lua. But file has a Lua

Hey guys,

I’d like to know if it’s possible to align the menu to the left. It is conflicting with my trew_hud_ui.

Thanks for your help!

IDK why loading stuff dosent work until you toggle the power multiplier. is that why you need to set up [MenuAPI] ? because i need the handling editor to actually 'Work"

idk if [MenuAPI] is the reason but did you set up [MenuAPI].
im trying to figure this aswell. power never works as it should untill power multiplier is toggled. and every edit or change you need to toggle the power multiplier again to gain the changes

Hi Neos7. I’m having some problems setting up this script. I tried to put it on my server but I can’t make this work! My server is an ESX based one and the key F7 is already taken by the gamemode so I changed it on the config.ini but still not work. I’ll link my log there. I hope u can help meCitizenFX_log_2021-01-12T153137.log (571.3 KB)

can u make it permission based so u have to give people perms to use it cos i would like to use this for my server but i dont want everyone tuning their cars

When applying a preset with or even adjusting ‘finitialdriveforce’ will require you to adjust the engine upgrade. In my case I use vMenu and after applying a handling preset with this script I must go into vMenu>vehicle options>modmenu and change the engine to ANY level. Stock or level 4. Doesn’t matter. This must also be done every single time you change vehicles or change the driveforce value.
I’ve installed this script alone on a server and this issue still persists. Nothing gets spat out in the debug either. Anyone got a fix? I know RSM does…

Hello. My programmer wrote this script for my server. The script includes: tire wear, changeable gearbox, and changeable suspension settings. But I ran into a problem, rubber wear does not work on all cars. On some cars everything is fine, and on some tires always show full wear, even after its replacement. Also, the gearbox changes (initial driveforce and maximum speed) do not apply, and the suspension settings do not work. In the RolePlay server, the mechanic job function does not work - when the mechanic repairs the car, the body and the rubber is restored, but if the player gets into his car, the rubber is completely erased again. I don’t understand why it doesn’t work? Here is my script:

ESX = nil
local Vehicles = {}

Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent(‘esx:getSharedObject’, function(obj) ESX = obj end)
Citizen.Wait(0)
end
ESX.TriggerServerCallback(‘esx_vehicleshop:getVehicles’, function(vehicles)
Vehicles = vehicles
end)
end)

local changetyresPrice = {
[‘street’] = 2500,
[‘sport’] = 5000,
[‘muscle’] = 2500,
[‘drag’] = 10000,
[‘vaz’] = 500,
[‘suv’] = 1000,
}

local repairEnginePrice = 1000
local repairBodyPrice = 2000 – Цена за ремонт кузова

local maxfInitialDragCoeff = 20-- максимальное значение fInitialDriveMaxFlatVel
local minfInitialDragCoeff = 1 – минимальное значение fInitialDriveMaxFlatVel

– меню Количество передач

local maxfnInitialDriveGears = 8
local minfnInitialDriveGears = 2

– меню Тормозное усилие

local maxfBrakeForce = 2
local minfBrakeForce = 0.01

– меню Баланс тормозов пер\зад

local minfBrakeBiasFront = 0.01
local maxfBrakeBiasFront = 1.0

– меню Жесткость пруэин

local minSuspensionForce = 1.0
local maxSuspensionForce = 5.0

– меню Аммортизаторы сжатие

local minSuspensionCompDamp = 0.5
local maxSuspensionCompDamp = 3.0

– меню Аммортизаторы отбой

local minfSuspensionReboundDamp = 0.5
local maxfSuspensionReboundDamp = 3.0

– меню Жесткость стабилизатора

local minAntiRollBarForce = 1.0
local maxAntiRollBarForce = 5.0

– меню Жесткость стабилизатора

local minAntiRollBarBiasFront = 0.01
local maxAntiRollBarBiasFront = 1.0
function openMenu()
ESX.UI.Menu.CloseAll()

local elements = {}

table.insert(elements, {label = 'НАЧАТЬ ГОНКУ', value = "menu_1"})             
table.insert(elements, {label = 'РЕМОНТ ДВИГАТЕЛЯ 1000$', value = "menu_2"})  
table.insert(elements, {label = 'РЕМОНТ КУЗОВА 2000$', value = "menu_3"})  
--table.insert(elements, {label = 'СМЕНИТЬ РЕЗИНУ', value = "menu_5"})  
table.insert(elements, {label = 'НАСТРОЙКА АВТО', value = "menu_6"})  

ESX.UI.Menu.Open(
    'default', GetCurrentResourceName(), 'menu',
    {
        title = 'Menu',
        align = 'bottom-right',
        elements = elements 
    },     
    function(data, menu)            
		if data.current.value == 'menu_1' then 
			
		ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'race_rate', {
			title = 'СТАВКА'
		}, function(data2, menu2)
			menu2.close()
			local rate = tonumber(data2.value)
			
			ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'race_delay', {
				title = 'ВРЕМЯ НА ПОДГОТОВКУ'
			}, function(data3, menu3)
				menu3.close()
				local delay = tonumber(data3.value)
				TriggerEvent("StreetRaces:startRaceMenu", rate, delay)
			
			
			end, function(data3, menu3)
				menu3.close()
			end)
		
			
		end, function(data2, menu2)
			menu2.close()
		end)
		menu.close()
		
		end
		if data.current.value == 'menu_2' then 
			if IsPedInAnyVehicle(GetPlayerPed(-1), false) then
				ESX.TriggerServerCallback('esx_menu:isUpdateAvailable', function(add)
					if add then 
						local vehicle = GetVehiclePedIsUsing(GetPlayerPed(-1))
						SetVehicleEngineHealth(vehicle, 1000.0)
						SetVehicleOnGroundProperly(vehicle)
					    SetVehicleUndriveable(vehicle, false)
					else
						ESX.ShowNotification('Недостаточно денег')
					end
				end, repairEnginePrice)
			else
				ESX.ShowNotification('Вы должны быть в машине')
			end
			menu.close()
		end
		if data.current.value == 'menu_3' then 
			if IsPedInAnyVehicle(GetPlayerPed(-1), false) then
				ESX.TriggerServerCallback('esx_menu:isUpdateAvailable', function(add)
					if add then 
						TriggerEvent("iens:repairNotMecano")			
					else
						ESX.ShowNotification('Недостаточно денег')
					end
				end, repairBodyPrice)
			else
				ESX.ShowNotification('Вы должны быть в машине')
			end
			menu.close()
		end
		if data.current.value == 'menu_4' then 
			TriggerEvent('xgc-tuner:openTuner')
			menu.close()
		end
		if data.current.value == 'menu_5' then 
			if IsPedInAnyVehicle(GetPlayerPed(-1), false) then
				local vehicle = GetVehiclePedIsUsing(GetPlayerPed(-1))
				for i=1, #Vehicles, 1 do
					if GetHashKey(Vehicles[i].model) == GetEntityModel(vehicle) then
						local price = changetyresPrice[Vehicles[i].category]
						ESX.TriggerServerCallback('esx_menu:isUpdateAvailable', function(add)
							if add then 
								TriggerEvent("TireWear:fixCar", vehicle)
							else
								ESX.ShowNotification('Недостаточно денег')
							end
						end, price)
						break
					end
				end
			
			
				
			else
				ESX.ShowNotification('Вы должны быть в машине')
			end
			menu.close()
		end
		if data.current.value == 'menu_6' then 
			if IsPedInAnyVehicle(GetPlayerPed(-1), false) then
				local vehicle = GetVehiclePedIsUsing(GetPlayerPed(-1))
				local selemets = {}
				--table.insert(selemets, {
				  --name    = "fInitialDragCoeff",
				  --label   = 'КОРОБКА ПЕРЕДАЧ',
				  --defaultValue = DecorGetFloat(vehicle, "fInitialDragCoeff"),
				  --value   = GetVehicleHandlingFloat(vehicle, "CHandlingData", "fInitialDragCoeff"),
				  --defaultFInitialDriveForce = DecorGetFloat(vehicle, "fInitialDriveForce"),
				  --type    = 'slider',
				  --max     = maxfInitialDragCoeff,
				  --min	  = minfInitialDragCoeff,
				--})
				table.insert(selemets, {
				  name    = "fSteeringLock",
				  label   = 'ВЫВОРОТ КОЛЁС',
				  value   = GetVehicleHandlingFloat(vehicle, "CHandlingData", "fSteeringLock"),
				  type    = 'slider',
				  max     = maxfSteeringLock,
				  min	  = minfSteeringLock,
				})
			    table.insert(selemets, {
				  name    = "nInitialDriveGears",
				  label   = 'КОЛИЧЕСТВО ПЕРЕДАЧ',
				  value   = GetVehicleHandlingFloat(vehicle, "CHandlingData", "nInitialDriveGears"),
				  type    = 'slider',
				  max     = maxnInitialDriveGears,
				  min	  = minnInitialDriveGears,
				})
				table.insert(selemets, {
				  name    = "fBrakeForce",
				  label   = 'ТОРМОЗНОЕ УСИЛИЕ',
				  value   = GetVehicleHandlingFloat(vehicle, "CHandlingData", "fBrakeForce"),
				  type    = 'slider',
				  max     = maxnfBrakeForce,
				  min	  = minnfBrakeForce,
				})
				table.insert(selemets, {
				  name    = "fBrakeBiasFront",
				  label   = 'БАЛАНС ТОРМОЗОВ ПЕР/ЗАД',
				  value   = GetVehicleHandlingFloat(vehicle, "CHandlingData", "fBrakeBiasFront"),
				  type    = 'slider',
				  max     = maxfBrakeBiasFront,
				  min	  = minfBrakeBiasFront,
				})
				table.insert(selemets, {
				  name    = "SuspensionForce",
				  label   = 'ЖЕСТКОСТЬ ПРУЖИН',
				  value   = GetVehicleHandlingFloat(vehicle, "CHandlingData", "SuspensionForce"),
				  type    = 'slider',
				  max     = maxSuspensionForce,
				  min	  = minSuspensionForce,
				})
				table.insert(selemets, {
				  name    = "SuspensionCompDamp",
				  label   = 'АММОРТИЗАТОРЫ СЖАТИЕ',
				  value   = GetVehicleHandlingFloat(vehicle, "CHandlingData", "SuspensionCompDamp"),
				  type    = 'slider',
				  max     = maxSuspensionCompDamp,
				  min	  = minSuspensionCompDamp,
				})
				table.insert(selemets, {
				  name    = "fSuspensionReboundDamp",
				  label   = 'АММОРТИЗАТОРЫ ОТБОЙ',
				  value   = GetVehicleHandlingFloat(vehicle, "CHandlingData", "fSuspensionReboundDamp"),
				  type    = 'slider',
				  max     = maxfSuspensionReboundDamp,
				  min	  = minfSuspensionReboundDamp,
				})
				table.insert(selemets, {
				  name    = "AntiRollBarForce",
				  label   = 'ЖЕСТКОСТЬ СТАБИЛИЗАТОРОВ',
				  value   = GetVehicleHandlingFloat(vehicle, "CHandlingData", "AntiRollBarForce"),
				  type    = 'slider',
				  max     = maxAntiRollBarForce,
				  min	  = minAntiRollBarForce,
				})
				table.insert(selemets, {
				  name    = "AntiRollBarBiasFront",
				  label   = 'БАЛАНС СТАБИЛИЗАТОРОВ ПЕР/ЗАД',
				  value   = GetVehicleHandlingFloat(vehicle, "CHandlingData", "AntiRollBarBiasFront"),
				  type    = 'slider',
				  max     = maxAntiRollBarBiasFront,
				  min	  = minAntiRollBarBiasFront,
				})
				ESX.UI.Menu.Open(
				'default', GetCurrentResourceName(), 'fInitialDragCoeff',
				{
					title = 'Menu',
					align = 'bottom-right',
					elements = selemets 
				},     
				function(data, menu)  
		

				end,
				function(data, menu)
					menu.close()
				end,
				function(data, menu)
					if data.current.name == 'fInitialDragCoeff' then 
						data.current.value = data.current.value + 0.0
						SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fInitialDragCoeff', data.current.value)
						if data.current.defaultValue ~= data.current.value then 
							local difference = (data.current.defaultValue - data.current.value) / 1000 
							local newvalue = data.current.defaultFInitialDriveForce - difference
							SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fInitialDriveForce', newvalue)
						else 
							SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fInitialDriveForce', data.current.defaultFInitialDriveForce)
						end
						print('fInitialDriveForce ' .. GetVehicleHandlingFloat(vehicle, "CHandlingData", "fInitialDriveForce"))
						print('fInitialDragCoeff ' .. GetVehicleHandlingFloat(vehicle, "CHandlingData", "fInitialDragCoeff"))
					end
					if data.current.name == 'fSteeringLock' then 
						data.current.value = data.current.value + 0.00
						SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fSteeringLock', data.current.value)
					end
                    if data.current.name == 'nInitialDriveGears' then 
						data.current.value = data.current.value + 0.00
						SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'nInitialDriveGears', data.current.value)
					end
					if data.current.name == 'fBrakeForce' then 
						data.current.value = data.current.value + 0.00
						SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fBrakeForce', data.current.value)
					end
					if data.current.name == 'fBrakeBiasFront' then 
						data.current.value = data.current.value + 0.00
						SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fBrakeBiasFront', data.current.value)
					end
					if data.current.name == 'SuspensionForce' then 
						data.current.value = data.current.value + 0.00
						SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'SuspensionForce', data.current.value)
					end
					if data.current.name == 'SuspensionCompDamp' then 
						data.current.value = data.current.value + 0.00
						SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'SuspensionCompDamp', data.current.value)
					end
					if data.current.name == 'fSuspensionReboundDamp' then 
						data.current.value = data.current.value + 0.00
						SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fSuspensionReboundDamp', data.current.value)
					end
					if data.current.name == 'AntiRollBarForce' then 
						data.current.value = data.current.value + 0.00
						SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'AntiRollBarForce', data.current.value)
					end
					if data.current.name == 'AntiRollBarBiasFront' then 
						data.current.value = data.current.value + 0.00
						SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'AntiRollBarBiasFront', data.current.value)
					end
				end

				)
			else
				ESX.ShowNotification('Вы должны быть в машине')
			end	
		end
    end,
	function(data, menu)
		menu.close()
	end
)

end

Citizen.CreateThread(function()
if not DecorIsRegisteredAsType(“fInitialDragCoeff”, 1) then
DecorRegister(“fInitialDragCoeff”, 1)
end
if not DecorIsRegisteredAsType(“fInitialDriveForce”, 1) then
DecorRegister(“fInitialDriveForce”, 1)
end
while true do
Citizen.Wait(0)
if IsControlJustPressed(0, 244) then
openMenu()
end
if IsPedInAnyVehicle(GetPlayerPed(-1), false) then
local vehicle = GetVehiclePedIsUsing(GetPlayerPed(-1))
if not DecorExistOn(vehicle, ‘fInitialDragCoeff’) then
DecorSetFloat(vehicle, ‘fInitialDragCoeff’, GetVehicleHandlingFloat(vehicle, “CHandlingData”, “fInitialDragCoeff”))
end
if not DecorExistOn(vehicle, ‘fInitialDriveForce’) then
DecorSetFloat(vehicle, ‘fInitialDriveForce’, GetVehicleHandlingFloat(vehicle, “CHandlingData”, “fInitialDriveForce”))
end
end

end
end)

Although I am in the vehicle, when I press the F7 key, the menu does not open.

Anytime soon?

can you make tutorial how to install that Handling Editor

I dont understand so i post to put my MenuAPI.dll to fxmanifest.lua folder i have no clue where is my fxmanifest.lua.

hello, great script, when i click F7, the menu briefly flashes and disappears. Why? I put the handling editor folder in the resources folder, and started it in .cfg

can you please make a how to install as i am having trouble getting it to work

A strange problem has occurred with the FiveM updates, and it has many errors, such as the player leaving the car while walking on it slowly or quickly, and it works like a flash. Please solve the problem and fix it

I’m using this very cool drift handling preset on other servers and it’s working perfectly, but when i try to apply the same preset on cars in my server they act weird, kinda like the handbrake was permanently pulled. Anyone have a fix for this?

Hello, is there anyway to make client saves added into an xml instead of kvs CitizenFX server