<?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=Crazy</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=Crazy"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Crazy"/>
	<updated>2026-05-19T15:21:35Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetObjectModel&amp;diff=17827</id>
		<title>GetObjectModel</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetObjectModel&amp;diff=17827"/>
		<updated>2008-11-22T11:10:28Z</updated>

		<summary type="html">&lt;p&gt;Crazy: GetObjectModel is also working clientside&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function retrieves the model ID of a specified object&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int getObjectModel ( object theObject )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theObject:''' The object which you wish to retrieve the model ID of&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an ''int'' with the object model id, or ''false'' it's no or an invalid object.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example destroys a haystack when a player targets it.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function onPlayerTargeted ( targetElem )&lt;br /&gt;
    if ( getElementType ( targetElem ) == &amp;quot;object&amp;quot; ) and ( getObjectModel ( targetElem ) == 3374 ) then&lt;br /&gt;
        destroyElement ( targetElem )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerTarget&amp;quot;, getRootElement(), onPlayerTargeted )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This example outputs the model id of objects the player is targeting.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function onPlayerTargeted ( targetElem )&lt;br /&gt;
    if ( getElementType ( targetElem ) == &amp;quot;object&amp;quot;) then&lt;br /&gt;
        outputChatBox ( getObjectModel(targetElem) )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerTarget&amp;quot;, getRootElement(), onPlayerTargeted )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Object functions}}&lt;/div&gt;</summary>
		<author><name>Crazy</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPlayerAmmoInClip&amp;diff=16585</id>
		<title>GetPlayerAmmoInClip</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPlayerAmmoInClip&amp;diff=16585"/>
		<updated>2008-04-19T16:24:02Z</updated>

		<summary type="html">&lt;p&gt;Crazy: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns an integer that contains the ammo in a specified [[player]]'s weapon. See [[weapon|Weapon Info]]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&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;
int getPlayerAmmoInClip ( player thePlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePlayer:''' The [[player]] whose ammo you want to check.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[int]] containing the amount of ammo in the player's currently selected clip, or 0 if the player specified is invalid.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&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;
int getPlayerAmmoInClip ( player thePlayer , int weaponSlot )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePlayer:''' The [[player]] whose ammo you want to check.&lt;br /&gt;
*'''weaponSlot:''' an integer representing the weapon slot.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
none&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[int]] containing the amount of ammo in the specified player's currently selected or specified clip, or 0 if the player specified is invalid.&lt;br /&gt;
&amp;lt;/section&amp;gt;&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 outputs the amount of ammo the specified player has in his current slot. For example: 'ammo someguy'.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function showAmmo( thePlayer, command, who )&lt;br /&gt;
	local targetPlayer = getPlayerFromNick ( who )&lt;br /&gt;
	if ( thePlayer ) then&lt;br /&gt;
		local ammo = getPlayerAmmoInClip ( targetPlayer )&lt;br /&gt;
		outputChatBox ( who .. &amp;quot; has &amp;quot; .. ammo .. &amp;quot; ammo in his active clip&amp;quot;, thePlayer )&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox ( &amp;quot;Player '&amp;quot; .. who .. &amp;quot;' not found.&amp;quot;, thePlayer )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler( &amp;quot;ammo&amp;quot;, showAmmo )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Player functions}}&lt;/div&gt;</summary>
		<author><name>Crazy</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPlayerWeaponSlot&amp;diff=16584</id>
		<title>GetPlayerWeaponSlot</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPlayerWeaponSlot&amp;diff=16584"/>
		<updated>2008-04-19T16:22:23Z</updated>

		<summary type="html">&lt;p&gt;Crazy: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Needs_Checking|Firstly, this doesnt even work properly apparently, and secondly, is there ANY point to this function?  We have getPlayerWeapon and getWeaponFromSlot.  This doesnt seem to have any necessity.  As a buggy function, it should be removed}}&lt;br /&gt;
This function gets the player's weapon slot.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int getPlayerWeaponSlot ( player thePlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePlayer''': the [[player]] you want to get the weapon slot from.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
none&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the weapon slot (as ''number'') on success, returns ''false'' otherwise.&lt;br /&gt;
{{Weapon_Slots}}&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
Pending.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[SetPlayerWeaponSlot]]&lt;/div&gt;</summary>
		<author><name>Crazy</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleLightState&amp;diff=16524</id>
		<title>GetVehicleLightState</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleLightState&amp;diff=16524"/>
		<updated>2008-04-06T10:37:24Z</updated>

		<summary type="html">&lt;p&gt;Crazy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Needs Checking|Seems that the function is broken and returns always 255 instead of 0 or 1. --[[User:Crazy|Crazy]] 05:37, 6 April 2008 (CDT) }}&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns the current state of the specified light on the vehicle.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;getVehicleLightState ( vehicle theVehicle, int light )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments==&lt;br /&gt;
*'''theVehicle:''' A handle to the [[vehicle]] that you wish to know the light state of.&lt;br /&gt;
*'''light:''' A whole number between 0 and 3&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns 0 (working) or 1 (broken)&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;newcar = createVehicle ( 520, 1024, 1024, 1024 )&lt;br /&gt;
state = getVehicleLightState ( newcar, 0 )&lt;br /&gt;
outputChatBox ( &amp;quot;The front-left light state on this car: &amp;quot; .. state )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Vehicle functions}}&lt;/div&gt;</summary>
		<author><name>Crazy</name></author>
	</entry>
</feed>