<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.gtaconnected.com/wiki/index.php?action=history&amp;feed=atom&amp;title=ScriptingExamples%2FVehicleAutoFlipperAndFixer</id>
	<title>ScriptingExamples/VehicleAutoFlipperAndFixer - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.gtaconnected.com/wiki/index.php?action=history&amp;feed=atom&amp;title=ScriptingExamples%2FVehicleAutoFlipperAndFixer"/>
	<link rel="alternate" type="text/html" href="https://wiki.gtaconnected.com/wiki/index.php?title=ScriptingExamples/VehicleAutoFlipperAndFixer&amp;action=history"/>
	<updated>2026-04-28T23:46:25Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.15</generator>
	<entry>
		<id>https://wiki.gtaconnected.com/wiki/index.php?title=ScriptingExamples/VehicleAutoFlipperAndFixer&amp;diff=3909&amp;oldid=prev</id>
		<title>Mex: Created page with &quot;{{DISPLAYTITLE:Vehicle Auto Flipper &amp; Fixer}} == Description == This code fixes the local player&#039;s vehicle and also flips it back if it&#039;s upside down, every 10th of a second....&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.gtaconnected.com/wiki/index.php?title=ScriptingExamples/VehicleAutoFlipperAndFixer&amp;diff=3909&amp;oldid=prev"/>
		<updated>2018-08-15T16:52:21Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{DISPLAYTITLE:Vehicle Auto Flipper &amp;amp; Fixer}} == Description == This code fixes the local player&amp;#039;s vehicle and also flips it back if it&amp;#039;s upside down, every 10th of a second....&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{DISPLAYTITLE:Vehicle Auto Flipper &amp;amp; Fixer}}&lt;br /&gt;
== Description ==&lt;br /&gt;
This code fixes the local player&amp;#039;s vehicle and also flips it back if it&amp;#039;s upside down, every 10th of a second.&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Lua, Client-Side, GTAC versions 1.0.72 and newer:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{{LuaCode|1=addEventHandler(&amp;#039;onResourceStart&amp;#039;, function(event, resource)&lt;br /&gt;
	if resource ~= thisResource then return end&lt;br /&gt;
	setInterval(function()&lt;br /&gt;
		if not localPlayer.vehicle then return end&lt;br /&gt;
		localPlayer.vehicle:fix()&lt;br /&gt;
		if not localPlayer.vehicle.flipped then return end&lt;br /&gt;
		if flippingVehicle then return end&lt;br /&gt;
		flippingVehicle = true&lt;br /&gt;
		local v = localPlayer.vehicle.velocity&lt;br /&gt;
		local t = localPlayer.vehicle.turnVelocity&lt;br /&gt;
		localPlayer.vehicle.velocity = {v.x, v.y, v.z + 0.14}&lt;br /&gt;
		localPlayer.vehicle.turnVelocity = {t.x + 0.12, t.y - 0.11, t.z}&lt;br /&gt;
		setTimeout(function()&lt;br /&gt;
			localPlayer.vehicle:fix()&lt;br /&gt;
			flippingVehicle = false&lt;br /&gt;
		end, 1000)&lt;br /&gt;
	end, 100)&lt;br /&gt;
end)}}&lt;/div&gt;</summary>
		<author><name>Mex</name></author>
	</entry>
</feed>