Boost police vehicle


#1

Hello,

I would like to know if it’s possible to boost engine of vehicle on server side ?

Thanks,
Simo,


#2

if someone has any about this, please let me know :slight_smile:


#3

You can, by modifying your handling.meta.


#4

are you sure it’s on the server side ? where can i put/find this files , in stream folder?


#5

Find your handling.meta in your single player installation, copy it, modify it, then place it in your resources with your streamed vehicles. Plenty of tutorials on here if you use the search feature.


#6

I found this http://www.gtamodding.com/wiki/Handling.meta but no tutorial, it’s pretty hard to do it tbh


#7

You could also take use of SetVehicleEnginePowerMultiplier() & SetVehicleEngineTorqueMultiplier() for specified hashkey.


#8

I probably missed something, this is a native gta function ?


#9

You can read about it here https://runtime.fivem.net/doc/reference.html


#10

thanks i’ll have a look !


#11
Citizen.CreateThread(function()
	while true do
		Citizen.Wait(0)
		if IsVehicleModel(GetVehiclePedIsIn(GetPlayerPed(-1), true), GetHashKey("VehicleModelName")) then --Insert VehicleModelName here.
			SetVehicleEnginePowerMultiplier(GetVehiclePedIsIn(GetPlayerPed(-1), true), 2.0)
			SetVehicleEngineTorqueMultiplier(GetVehiclePedIsIn(GetPlayerPed(-1), true), 2.0)
		end
	end
end)

I wrote it real quick at my phone, could contain a mistake


#12

Search the natives for engine, power, torque.

I once saw some handling code that would correct the cars roll during a fast turn. Once saw another that would apply a downforce to the outer wheels of a left turn. And I think there might be a suspension / drag Native that could help improve handling at fast speeds.