<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/GetValidVehicleModels?action=history&amp;feed=atom</id>
	<title>GetValidVehicleModels - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/GetValidVehicleModels?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetValidVehicleModels&amp;action=history"/>
	<updated>2026-05-10T02:42:17Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetValidVehicleModels&amp;diff=57235&amp;oldid=prev</id>
		<title>Pirulax: /* Code */</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetValidVehicleModels&amp;diff=57235&amp;oldid=prev"/>
		<updated>2018-07-31T21:25:41Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Code&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:25, 31 July 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l14&quot;&gt;Line 14:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local validVehicles = { }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local validVehicles = { }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local invalidModels = {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local invalidModels = {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;435&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;]=true, [&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;449&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;]=true, [&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;450&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;]=true, [&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;537&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;]=true,&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		[435]=true, [449]=true, [450]=true, [537]=true,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;538&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;]=true, [&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;569&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;]=true, [&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;570&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;]=true, [&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;584&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;]=true,&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		[538]=true, [569]=true, [570]=true, [584]=true,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;590&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;]=true, [&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;591&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;]=true, [&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;606&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;]=true, [&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;607&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;]=true,  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		[590]=true, [591]=true, [606]=true, [607]=true,  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;608&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;]=true&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		[608]=true&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	for i=400, 609 do&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	for i=400, 609 do&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		if ( not invalidModels[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;tostring(&lt;/del&gt;i&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/del&gt;] ) then&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		if ( not invalidModels[i] ) then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;			table.insert ( validVehicles, i )&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;			table.insert ( validVehicles, i )&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		end&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki-wiki_dev_:diff::1.12:old-37310:rev-57235 --&gt;
&lt;/table&gt;</summary>
		<author><name>Pirulax</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetValidVehicleModels&amp;diff=37310&amp;oldid=prev</id>
		<title>OpenIDUser58: Created page with &quot;{{Useful Function}} __NOTOC__ This function returns a table containing the valid (drivable) vehicles for GTA:SA&lt;br/&gt;  ==Syntax== &lt;syntaxhighlight lang=&quot;lua&quot;&gt;table getValidVehicleModels (  )&lt;/co...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetValidVehicleModels&amp;diff=37310&amp;oldid=prev"/>
		<updated>2013-10-15T02:07:02Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Useful Function}} __NOTOC__ This function returns a table containing the valid (drivable) vehicles for GTA:SA&amp;lt;br/&amp;gt;  ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getValidVehicleModels (  )&amp;lt;/co...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns a table containing the valid (drivable) vehicles for GTA:SA&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getValidVehicleModels (  )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a table with the MTA vehicle models. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getValidVehicleModels ( )&lt;br /&gt;
	local validVehicles = { }&lt;br /&gt;
	local invalidModels = {&lt;br /&gt;
		['435']=true, ['449']=true, ['450']=true, ['537']=true,&lt;br /&gt;
		['538']=true, ['569']=true, ['570']=true, ['584']=true,&lt;br /&gt;
		['590']=true, ['591']=true, ['606']=true, ['607']=true, &lt;br /&gt;
		['608']=true&lt;br /&gt;
	}&lt;br /&gt;
	for i=400, 609 do&lt;br /&gt;
		if ( not invalidModels[tostring(i)] ) then&lt;br /&gt;
			table.insert ( validVehicles, i )&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return validVehicles&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This is an example of the function.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
for index, model in ipairs ( getValidVehicleModels ( ) ) do&lt;br /&gt;
	outputChatBox ( tostring ( model ) ) &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Author: xXMADEXx&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>OpenIDUser58</name></author>
	</entry>
</feed>