Edununes27 0 Posted Sunday at 20:41 Share Posted Sunday at 20:41 Is there a way for me to increase the maximum speed of helicopters on a mta server? Link to post
andr0xy 204 Posted Sunday at 20:51 Share Posted Sunday at 20:51 @Edununes27, welcome to the forums! Thread has been moved into a better section: Scripting. On-topic: yes, you can do that. Use the function setVehicleHandling, with the property engineAcceleration. Link to post
Dutchman101 746 Posted Sunday at 20:57 Share Posted Sunday at 20:57 8 minutes ago, andr0xy said: On-topic: yes, you can do that. Use the function setVehicleHandling, with the property engineAcceleration. Unfortunately handling doesn't affect helicopters to increase speed, it's some sort of GTA limitation.. maybe it can be fixed in MTA some day 1 Link to post
XaskeL 69 Posted Monday at 20:20 Share Posted Monday at 20:20 (edited) Why not try giving some kind of speed boost with vehicle.velocity? Write to resource manifest: <oop>true</oop> -- Author: XaskeL -- Created 05/05/2021 -- https://forum.mtasa.com/topic/130200-speed-of-helicopters local CAircraftSpeed = { addEventHandler = addEventHandler; setTimer = setTimer; localPlayer = localPlayer; tostring = tostring; g_iInterval = 50; g_fMultVelocity = 0.44; g_fVelocityLimit = 200; _DEBUG = true; }; CAircraftSpeed.__index = CAircraftSpeed; setmetatable( CAircraftSpeed, { __index = _G; } ); setfenv( 1, CAircraftSpeed ); if ( _DEBUG ) then addEventHandler( "onClientRender", root, function ( ) local pVehicle = localPlayer.vehicle; if ( pVehicle ) then dxDrawText( tostring( pVehicle.velocity.length * 180 ) .. " km/h", 600, 600, 600, 600 ); end end ); end CAircraftSpeed.OnCheck = function ( ) local pVehicle = localPlayer.vehicle; if ( pVehicle and pVehicle.type == "Helicopter" ) then local vecVelocity = pVehicle.velocity; local fMultiplyOffset = ( 1.0 + g_fMultVelocity ); if ( vecVelocity.length * 180 < g_fVelocityLimit ) then pVehicle.velocity = Vector3( vecVelocity.x * fMultiplyOffset, vecVelocity.y * fMultiplyOffset, vecVelocity.z ); end end end; CAircraftSpeed.OnStart = function ( ) setTimer( OnCheck, g_iInterval, 0 ); end; addEventHandler( "onClientResourceStart", resourceRoot, OnStart ); Edited Monday at 20:42 by XaskeL Link to post
Dutchman101 746 Posted Monday at 23:39 Share Posted Monday at 23:39 3 hours ago, XaskeL said: Why not try giving some kind of speed boost with vehicle.velocity? Hmm, sounds like an interesting workaround.. I am wondering if it looks natural without hitches (heli movement), including for remote players? As well as that it looks as good for laggers (or lagger remote players) as default heli movement would look on their screen? No chance of position or remote player vs local player interpolation desync, or rubberbanding? At least i will test it soon and attach a video of how it looks locally, on the heli driver's screen.. Link to post
XaskeL 69 Posted Tuesday at 06:36 Share Posted Tuesday at 06:36 6 hours ago, Dutchman101 said: Hmm, sounds like an interesting workaround.. I am wondering if it looks natural without hitches (heli movement), including for remote players? As well as that it looks as good for laggers (or lagger remote players) as default heli movement would look on their screen? No chance of position or remote player vs local player interpolation desync, or rubberbanding? At least i will test it soon and attach a video of how it looks locally, on the heli driver's screen.. I was able to get a quick acceleration of the helicopter to 180 km / h, and it seems to me that if the acceleration is increased strongly, it will damage the controllability and it will be necessary to make compensators for the rotational speed along the axes. https://wiki.multitheftauto.com/wiki/SetElementAngularVelocity Link to post
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now