<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://rage.grandroleplay.ru/index.php?action=history&amp;feed=atom&amp;title=PlayerWeaponShot</id>
	<title>PlayerWeaponShot - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://rage.grandroleplay.ru/index.php?action=history&amp;feed=atom&amp;title=PlayerWeaponShot"/>
	<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=PlayerWeaponShot&amp;action=history"/>
	<updated>2026-07-24T21:11:12Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://rage.grandroleplay.ru/index.php?title=PlayerWeaponShot&amp;diff=12580&amp;oldid=prev</id>
		<title>imported&gt;Sudodude: Readability, parameter definitions and syntax/grammar fixes/updates.</title>
		<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=PlayerWeaponShot&amp;diff=12580&amp;oldid=prev"/>
		<updated>2019-05-16T19:14:33Z</updated>

		<summary type="html">&lt;p&gt;Readability, parameter definitions and syntax/grammar fixes/updates.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This event is called every time a player shoots a weapon.&lt;br /&gt;
{{ClientsideCsJsEvent}}&lt;br /&gt;
{{CSharpContainer|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
public delegate void OnPlayerWeaponShotDelegate(Vector3 targetPos, Player target, CancelEventArgs cancel);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{Parameters}}&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;targetPos&amp;#039;&amp;#039;&amp;#039; - the position of the target, expects &amp;#039;&amp;#039;&amp;#039;RAGE.Vector3&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;target&amp;#039;&amp;#039;&amp;#039; - the target player, expects &amp;#039;&amp;#039;&amp;#039;RAGE.Elements.Player&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;cancel&amp;#039;&amp;#039;&amp;#039; - cancel, expects &amp;#039;&amp;#039;&amp;#039;RAGE.Events.CancelEventArgs&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{Example}}&lt;br /&gt;
The example below shows a chat message to the client when they shoot a weapon&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
Events.OnPlayerWeaponShot += OnPlayerWeaponShot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
public void OnPlayerWeaponShot(RAGE.Vector3 targetPos, RAGE.Elements.Player target, RAGE.Events.CancelEventArgs cancel)&lt;br /&gt;
{&lt;br /&gt;
    RAGE.Chat.Output($&amp;quot;You shot a weapon&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{JSContainer|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
mp.events.add(&amp;#039;playerWeaponShot&amp;#039;, (targetPosition, targetEntity) =&amp;gt; {});&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Parameters}}&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;targetPosition&amp;#039;&amp;#039;&amp;#039;: Target&amp;#039;s position, output expects a &amp;#039;&amp;#039;&amp;#039;[[Vector3::Vector3|Vector3]]&amp;#039;&amp;#039;&amp;#039; type.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;targetEntity&amp;#039;&amp;#039;&amp;#039;: Target&amp;#039;s entity, output expects &amp;#039;&amp;#039;&amp;#039;any&amp;#039;&amp;#039;&amp;#039; type. Returns undefined if no target entity.&lt;br /&gt;
&lt;br /&gt;
{{Example}}&lt;br /&gt;
The example below prints a message to the player&amp;#039;s chat every time the player fires a weapon.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
mp.events.add(&amp;#039;playerWeaponShot&amp;#039;, (targetPosition, targetEntity) =&amp;gt; {&lt;br /&gt;
    mp.gui.chat.push(&amp;#039;You fired a weapon!&amp;#039;);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Client-side Event]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Sudodude</name></author>
	</entry>
</feed>