<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Renoaro13</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Renoaro13"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Renoaro13"/>
	<updated>2026-05-01T16:09:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetModelHandling&amp;diff=50403</id>
		<title>SetModelHandling</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetModelHandling&amp;diff=50403"/>
		<updated>2017-02-08T20:13:17Z</updated>

		<summary type="html">&lt;p&gt;Renoaro13: /* Handling Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}} &lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function is used to change the handling data of all vehicles of a specified model.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setModelHandling ( int modelId, string property, var value ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''modelId:''' The [[Vehicle_IDs|vehicle model]] you wish to set the handling of.&lt;br /&gt;
*'''property:''' The property you wish to set the handling of the vehicle to, or ''nil'' if you want to reset the all the handling properties.&lt;br /&gt;
*'''value:''' The value of the models's handling property you wish to set, or ''nil'' if you want to reset the handling property to its default value.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the handling was set successfully, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Handling Properties==&lt;br /&gt;
See below a list of valid properties and their required values:&lt;br /&gt;
{{Handling Properties}}&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example script changes the handling of all Bullet.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function handlingChange()&lt;br /&gt;
	local modelId = 541&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;mass&amp;quot;, 1890)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;turnMass&amp;quot;, 3780)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;dragCoeff&amp;quot;, 0.7)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;centerOfMass&amp;quot;, {0.0, 0.1, -0.2} )&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;percentSubmerged&amp;quot;, 75)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;tractionMultiplier&amp;quot;, 0.70)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;tractionLoss&amp;quot;, 0.90)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;tractionBias&amp;quot;, 0.50)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;numberOfGears&amp;quot;, 5)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;maxVelocity&amp;quot;, 407)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;engineAcceleration&amp;quot;, 50)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;engineInertia&amp;quot;, 10)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;driveType&amp;quot;, &amp;quot;awd&amp;quot;)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;engineType&amp;quot;, &amp;quot;petrol&amp;quot;)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;brakeDeceleration&amp;quot;, 11)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;brakeBias&amp;quot;, 0.45)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;ABS&amp;quot;, false)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;steeringLock&amp;quot;, 30)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;suspensionForceLevel&amp;quot;, 0.80)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;suspensionDamping&amp;quot;, 0.20)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;suspensionHighSpeedDamping&amp;quot;, 0.0)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;suspensionUpperLimit&amp;quot;, 0.10)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;suspensionLowerLimit&amp;quot;, -0.09)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;suspensionFrontRearBias&amp;quot;, 0.5)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;suspensionAntiDiveMultiplier&amp;quot;, 0.6)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;seatOffsetDistance&amp;quot;, 0.3)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;collisionDamageMultiplier&amp;quot;, 0.50)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;monetary&amp;quot;, 1460000)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;modelFlags&amp;quot;, 0xC0222004)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;handlingFlags&amp;quot;, 0x1400000)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;headLight&amp;quot;, 1)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;tailLight&amp;quot;, 1)&lt;br /&gt;
	setModelHandling(modelId, &amp;quot;animGroup&amp;quot;, 0)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onResourceStart&amp;quot;, resourceRoot, handlingChange)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This function will reset the handling of Bullet vehicles to its default state.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function resetHandling()&lt;br /&gt;
	local modelId = 541&lt;br /&gt;
	for k,_ in pairs(getModelHandling(modelId)) do&lt;br /&gt;
		setModelHandling(modelId, k, nil)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onResourceStop&amp;quot;, resourceRoot, resetHandling)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{Issues|&lt;br /&gt;
{{Issue|7454|setModelHandling doesn't work with already created vehicles}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==See other vehicle functions==&lt;br /&gt;
{{Vehicle functions}}&lt;/div&gt;</summary>
		<author><name>Renoaro13</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetVehicleHandling&amp;diff=50402</id>
		<title>SetVehicleHandling</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetVehicleHandling&amp;diff=50402"/>
		<updated>2017-02-08T20:08:32Z</updated>

		<summary type="html">&lt;p&gt;Renoaro13: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}} &lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function is used to change the handling data of a vehicle.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setVehicleHandling ( element theVehicle, string property, var value ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Syntaxes for reset configurations:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setVehicleHandling ( element theVehicle, string property, nil, true )  -- Reset one property to model handling value&lt;br /&gt;
bool setVehicleHandling ( element theVehicle, string property, nil, true )   -- Reset one property to GTA default value&lt;br /&gt;
bool setVehicleHandling ( element theVehicle, false )  -- Reset all properties to model handling value&lt;br /&gt;
bool setVehicleHandling ( element theVehicle, true )   -- Reset all properties to GTA default value&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The vehicle you wish to set the handling of.&lt;br /&gt;
*'''property:''' The property you wish to set the handling of the vehicle to.&lt;br /&gt;
{{Handling Properties}}&lt;br /&gt;
*'''value:''' The value of the property you wish to set the handling of the vehicle to.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the handling was set successfully, ''true'' otherwise. See below a list of valid propertys and their required values:&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
for functionality reasons suspension modification is disabled on monster trucks, trains, boats and trailers.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example will make Infernus handling very fast and also make it damage proof from collision (handling by Mr.unpredictable).&lt;br /&gt;
this example will help you in creating your own vehicle Handling.&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function vhandling ( )&lt;br /&gt;
   for _,v in pairs(getElementsByType(&amp;quot;vehicle&amp;quot;)) do&lt;br /&gt;
      if getElementModel(v) == 415 then -------------- vehicle Id cheetah&lt;br /&gt;
        setVehicleHandling (v, &amp;quot;mass&amp;quot;, 900.0)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;turnMass&amp;quot;, 500)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;dragCoeff&amp;quot;, 4.0 )&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;centerOfMass&amp;quot;, { 0.0,0.08,-0.09 } )&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;percentSubmerged&amp;quot;, 103)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;tractionMultiplier&amp;quot;, 1.8)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;tractionLoss&amp;quot;, 1.0)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;tractionBias&amp;quot;, 0.48)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;numberOfGears&amp;quot;, 5)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;maxVelocity&amp;quot;, 300.0)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;engineAcceleration&amp;quot;, 90.0 )&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;engineInertia&amp;quot;, 5.0)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;driveType&amp;quot;, &amp;quot;rwd&amp;quot;)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;engineType&amp;quot;, &amp;quot;disel&amp;quot;)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;brakeDeceleration&amp;quot;, 20.0)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;brakeBias&amp;quot;, 9.99)&lt;br /&gt;
        -----abs----&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;steeringLock&amp;quot;,  99.9 )&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;suspensionForceLevel&amp;quot;, 2.99)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;suspensionDamping&amp;quot;, 6.50 )&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;suspensionHighSpeedDamping&amp;quot;, 9.9)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;suspensionUpperLimit&amp;quot;, 9.99 )&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;suspensionLowerLimit&amp;quot;, -0.16)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;suspensionFrontRearBias&amp;quot;, 0.5 )&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;suspensionAntiDiveMultiplier&amp;quot;, 0.0)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;seatOffsetDistance&amp;quot;, 0.0)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;collisionDamageMultiplier&amp;quot;, 0.00)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;monetary&amp;quot;,  10000)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;modelFlags&amp;quot;, 1002000)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;handlingFlags&amp;quot;, 1000002)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;headLight&amp;quot;, 3)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;tailLight&amp;quot;, 2)&lt;br /&gt;
        setVehicleHandling(v, &amp;quot;animGroup&amp;quot;, 4)&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerVehicleEnter&amp;quot;, getRootElement(), vhandling )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example will add a command for players with which they can change the mass of the vehicle.&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;	 &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function massChange ( me, command, mass )&lt;br /&gt;
    mass = tonumber ( mass ) -- Convert mass to a number&lt;br /&gt;
    local veh = getPedOccupiedVehicle ( me ) -- Get the player's vehicle&lt;br /&gt;
    &lt;br /&gt;
    if mass and veh then  -- If valid mass and in a vehicle&lt;br /&gt;
        local success = setVehicleHandling ( veh, &amp;quot;mass&amp;quot;, mass ) -- Set the vehicle's mass, and check if successful&lt;br /&gt;
        &lt;br /&gt;
        if success then -- If successful&lt;br /&gt;
            outputChatBox ( &amp;quot;Your vehicle's mass has been changed to: &amp;quot;..mass..&amp;quot; kg&amp;quot;, me, 0, 255, 0 ) -- Notify the player of success&lt;br /&gt;
        else -- Too bad failure is still an option&lt;br /&gt;
            outputChatBox ( &amp;quot;Setting mass failed. It's probably above or below allowed limits&amp;quot;, me, 255, 0, 0 ) -- Notify the player of failure, and give a possible reason&lt;br /&gt;
        end&lt;br /&gt;
    elseif not veh then -- If not in a vehicle&lt;br /&gt;
        outputChatBox ( &amp;quot;You're not in a vehicle&amp;quot;, me, 255, 0, 0 ) -- Tell the player; He / she obviously doesn't know&lt;br /&gt;
    elseif not mass then -- If not a valid mass&lt;br /&gt;
        outputChatBox ( &amp;quot;Syntax: /changemass [mass]&amp;quot;, me, 255, 0, 0 ) -- Tell the player the proper syntax&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;changemass&amp;quot;, massChange )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See other vehicle functions==&lt;br /&gt;
{{Vehicle functions}}&lt;/div&gt;</summary>
		<author><name>Renoaro13</name></author>
	</entry>
</feed>