<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.rage.mp/w/index.php?action=history&amp;feed=atom&amp;title=Weapon%3A%3AgetDamageType</id>
	<title>Weapon::getDamageType - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.rage.mp/w/index.php?action=history&amp;feed=atom&amp;title=Weapon%3A%3AgetDamageType"/>
	<link rel="alternate" type="text/html" href="https://wiki.rage.mp/w/index.php?title=Weapon::getDamageType&amp;action=history"/>
	<updated>2026-07-21T15:18:54Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.rage.mp/w/index.php?title=Weapon::getDamageType&amp;diff=21835&amp;oldid=prev</id>
		<title>Shr0x at 08:14, 25 April 2024</title>
		<link rel="alternate" type="text/html" href="https://wiki.rage.mp/w/index.php?title=Weapon::getDamageType&amp;diff=21835&amp;oldid=prev"/>
		<updated>2024-04-25T08:14:23Z</updated>

		<summary type="html">&lt;p&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 08:14, 25 April 2024&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-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&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;{{ClientsideJsFunction}}&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;{{ClientsideJsFunction}}&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;{{JSContainer|&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;{{JSContainer|&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;Checks whether ped&#039;s current &lt;/del&gt;weapon &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;flashlight is &lt;/del&gt;on &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;or off&lt;/del&gt;.&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Get &lt;/ins&gt;weapon &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;damage type based &lt;/ins&gt;on &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;given weapon hash&lt;/ins&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;=== Required Params ===&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;=== Required Params ===&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;*&amp;#039;&amp;#039;&amp;#039;handle&amp;#039;&amp;#039;&amp;#039; {{RageType|number}}&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;*&amp;#039;&amp;#039;&amp;#039;handle&amp;#039;&amp;#039;&amp;#039; {{RageType|number}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key rmp_wiki:diff::1.12:old-21834:rev-21835 --&gt;
&lt;/table&gt;</summary>
		<author><name>Shr0x</name></author>
	</entry>
	<entry>
		<id>https://wiki.rage.mp/w/index.php?title=Weapon::getDamageType&amp;diff=21834&amp;oldid=prev</id>
		<title>Shr0x: Created page with &quot;{{ClientsideJsFunction}} {{JSContainer| Checks whether ped&#039;s current weapon flashlight is on or off. === Required Params === *&#039;&#039;&#039;handle&#039;&#039;&#039; {{RageType|number}}  === Return Value === *&#039;&#039;&#039;type&#039;&#039;&#039; {{RageType|number}}  === Damage Types === &lt;pre&gt;  const damageTypes = [     &quot;unknown&quot;, &quot;none&quot;, &quot;melee&quot;, &quot;bullet&quot;, &quot;rubber bullet&quot;,      &quot;explosive&quot;, &quot;fire&quot;, &quot;collision&quot;, &quot;fall&quot;, &quot;drown&quot;,      &quot;electric&quot;, &quot;barbed wire&quot;, &quot;fire extinguisher&quot;, &quot;smoke&quot;,     &quot;water cannon&quot;, &quot;tranquilizer&quot;...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.rage.mp/w/index.php?title=Weapon::getDamageType&amp;diff=21834&amp;oldid=prev"/>
		<updated>2024-04-25T08:14:04Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{ClientsideJsFunction}} {{JSContainer| Checks whether ped&amp;#039;s current weapon flashlight is on or off. === Required Params === *&amp;#039;&amp;#039;&amp;#039;handle&amp;#039;&amp;#039;&amp;#039; {{RageType|number}}  === Return Value === *&amp;#039;&amp;#039;&amp;#039;type&amp;#039;&amp;#039;&amp;#039; {{RageType|number}}  === Damage Types === &amp;lt;pre&amp;gt;  const damageTypes = [     &amp;quot;unknown&amp;quot;, &amp;quot;none&amp;quot;, &amp;quot;melee&amp;quot;, &amp;quot;bullet&amp;quot;, &amp;quot;rubber bullet&amp;quot;,      &amp;quot;explosive&amp;quot;, &amp;quot;fire&amp;quot;, &amp;quot;collision&amp;quot;, &amp;quot;fall&amp;quot;, &amp;quot;drown&amp;quot;,      &amp;quot;electric&amp;quot;, &amp;quot;barbed wire&amp;quot;, &amp;quot;fire extinguisher&amp;quot;, &amp;quot;smoke&amp;quot;,     &amp;quot;water cannon&amp;quot;, &amp;quot;tranquilizer&amp;quot;...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{ClientsideJsFunction}}&lt;br /&gt;
{{JSContainer|&lt;br /&gt;
Checks whether ped&amp;#039;s current weapon flashlight is on or off.&lt;br /&gt;
=== Required Params ===&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;handle&amp;#039;&amp;#039;&amp;#039; {{RageType|number}}&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;type&amp;#039;&amp;#039;&amp;#039; {{RageType|number}}&lt;br /&gt;
&lt;br /&gt;
=== Damage Types ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
const damageTypes = [&lt;br /&gt;
    &amp;quot;unknown&amp;quot;, &amp;quot;none&amp;quot;, &amp;quot;melee&amp;quot;, &amp;quot;bullet&amp;quot;, &amp;quot;rubber bullet&amp;quot;, &lt;br /&gt;
    &amp;quot;explosive&amp;quot;, &amp;quot;fire&amp;quot;, &amp;quot;collision&amp;quot;, &amp;quot;fall&amp;quot;, &amp;quot;drown&amp;quot;, &lt;br /&gt;
    &amp;quot;electric&amp;quot;, &amp;quot;barbed wire&amp;quot;, &amp;quot;fire extinguisher&amp;quot;, &amp;quot;smoke&amp;quot;,&lt;br /&gt;
    &amp;quot;water cannon&amp;quot;, &amp;quot;tranquilizer&amp;quot;&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mp.game.weapon.getDamageType(handle);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
{{ClientsideCode|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
const damageTypes = [&lt;br /&gt;
    &amp;quot;unknown&amp;quot;, &amp;quot;none&amp;quot;, &amp;quot;melee&amp;quot;, &amp;quot;bullet&amp;quot;, &amp;quot;rubber bullet&amp;quot;, &lt;br /&gt;
    &amp;quot;explosive&amp;quot;, &amp;quot;fire&amp;quot;, &amp;quot;collision&amp;quot;, &amp;quot;fall&amp;quot;, &amp;quot;drown&amp;quot;, &lt;br /&gt;
    &amp;quot;electric&amp;quot;, &amp;quot;barbed wire&amp;quot;, &amp;quot;fire extinguisher&amp;quot;, &amp;quot;smoke&amp;quot;,&lt;br /&gt;
    &amp;quot;water cannon&amp;quot;, &amp;quot;tranquilizer&amp;quot;&lt;br /&gt;
]&lt;br /&gt;
const damageType = mp.game.weapon.getDamageType(mp.game.joaat(&amp;quot;WEAPON_PISTOL&amp;quot;));&lt;br /&gt;
const damageTypeName = damageTypes[damageType] || &amp;quot;unk&amp;quot;;&lt;br /&gt;
mp.console.logInfo(`Weapon damage type is ${damageTypeName}`);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
==See also==&lt;br /&gt;
{{Weapon_s_function_c}}&lt;br /&gt;
[[Category:Clientside API]]&lt;br /&gt;
[[Category:TODO: Example]]&lt;/div&gt;</summary>
		<author><name>Shr0x</name></author>
	</entry>
</feed>