<?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=Sebbe</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=Sebbe"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Sebbe"/>
	<updated>2026-04-13T00:06:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetWeaponClipAmmo&amp;diff=37572</id>
		<title>SetWeaponClipAmmo</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetWeaponClipAmmo&amp;diff=37572"/>
		<updated>2013-11-15T09:39:00Z</updated>

		<summary type="html">&lt;p&gt;Sebbe: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Needs_Example}}&lt;br /&gt;
Set the ammo in a custom weapons magazine/clip.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setWeaponClipAmmo ( weapon theWeapon, int clipAmmo )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theWeapon:''' The weapon to set the clip ammo of.&lt;br /&gt;
* '''clipAmmo:''' The amount of ammo in the clip.&lt;br /&gt;
===Example===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createWepCmd()&lt;br /&gt;
	local wep = createWeapon(&amp;quot;m4&amp;quot;, 0, 0, 0)&lt;br /&gt;
	setWeaponClipAmmo(wep, 50)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;weapon&amp;quot;, createWepCmd)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.0-9.04555|}}&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Weapon functions}}&lt;/div&gt;</summary>
		<author><name>Sebbe</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetWeaponFiringRate&amp;diff=37571</id>
		<title>GetWeaponFiringRate</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetWeaponFiringRate&amp;diff=37571"/>
		<updated>2013-11-15T09:35:37Z</updated>

		<summary type="html">&lt;p&gt;Sebbe: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Needs_Example}}&lt;br /&gt;
Gets the firing rate to be used when you set the custom weapon to the firing state.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int getWeaponFiringRate ( weapon theWeapon )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theWeapon:''' The weapon to modify the firing rate of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an ''integer'' with the firing rate of the custom weapon, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
wep = createWeapon(&amp;quot;minigun&amp;quot;, 0, 0, 0)&lt;br /&gt;
&lt;br /&gt;
function getWepRate()&lt;br /&gt;
	if (not wep) then return end&lt;br /&gt;
	local rate = getWeaponFiringRate(wep)&lt;br /&gt;
	outputChatBox(&amp;quot;Fire rate: &amp;quot;..rate)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;firerate&amp;quot;, getWepRate)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.0-9.04555|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client weapon creation functions}}&lt;/div&gt;</summary>
		<author><name>Sebbe</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetWeaponTarget&amp;diff=37570</id>
		<title>GetWeaponTarget</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetWeaponTarget&amp;diff=37570"/>
		<updated>2013-11-15T09:30:14Z</updated>

		<summary type="html">&lt;p&gt;Sebbe: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Needs Example}}&lt;br /&gt;
Get the target of the custom weapon.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;element getWeaponTarget ( weapon theWeapon )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theWeapon:''' The weapon to get the target of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the ''target element'' of the custom weapon, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
Create Weapon and get weapon target.When it founded - fire weapon to the target all time,if it in the weapon sight.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function CreateWeapon ()&lt;br /&gt;
  local weapon = createWeapon (&amp;quot;m4&amp;quot;, 0, 0, 0)  --create gun &amp;quot;m4&amp;quot; in 0,0,0 position.&lt;br /&gt;
  local weapontarget = getWeaponTarget ( weapon )&lt;br /&gt;
    if weapontarget then&lt;br /&gt;
    setTimer (function()&lt;br /&gt;
    fireWeapon ( weapon )&lt;br /&gt;
    end,100,0)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler (&amp;quot;onClientResourceStart&amp;quot;,getRootElement(),CreateWeapon)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.0-9.04555|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client weapon creation functions}}&lt;/div&gt;</summary>
		<author><name>Sebbe</name></author>
	</entry>
</feed>