<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.rage.mp/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ENN</id>
	<title>RAGE Multiplayer Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.rage.mp/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ENN"/>
	<link rel="alternate" type="text/html" href="https://wiki.rage.mp/wiki/Special:Contributions/ENN"/>
	<updated>2026-06-04T17:33:33Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.rage.mp/w/index.php?title=Player::call&amp;diff=8504</id>
		<title>Player::call</title>
		<link rel="alternate" type="text/html" href="https://wiki.rage.mp/w/index.php?title=Player::call&amp;diff=8504"/>
		<updated>2018-01-07T18:38:37Z</updated>

		<summary type="html">&lt;p&gt;ENN: informed anyone reading that you cant pass vector3 type variables through this call&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This function call added client-side event for selected player.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
player.call(String eventName [, ...args]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*&#039;&#039;&#039;eventName:&#039;&#039;&#039; Event name, what will be called.&lt;br /&gt;
*&#039;&#039;&#039;args:&#039;&#039;&#039; Any arguments, what should be sended to client. Supports entities, strings, numbers and booleans. (Objects and Arrays should be packed to JSON format.)&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
That&#039;s example will call event added on client side for player with ID 1337, disable regeneration health and send number current player health.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;header&amp;quot; style=&amp;quot;background-color: #AE4040; color: #FFFFFF; border: 2px solid #AE4040;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 10px 10px 10px 10px;&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Client-Side&amp;lt;/b&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
let disableRegeneration = (currentHealth) =&amp;gt; { //currentHealth - value, what we send from server.&lt;br /&gt;
	mp.game.player.setHealthRechargeMultiplier(0); //Disable regeneration&lt;br /&gt;
	let text = `Regeneration disabled. Current health: ${currentHealth}`;&lt;br /&gt;
	mp.gui.chat.push(text); //Output text to default chatbox&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
mp.events.add(&#039;disablePlayerRegeneration&#039;, disableRegeneration);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;header&amp;quot; style=&amp;quot;background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 10px 10px 10px 10px;&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Server-Side&amp;lt;/b&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; highlight=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
let player = mp.player.at(1337); //Get player by ID&lt;br /&gt;
if (player) {&lt;br /&gt;
	let playerHealth = player.health;&lt;br /&gt;
	player.call(`disablePlayerRegeneration`, playerHealth);&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; You cannot pass Vector3 types &amp;lt;/b&amp;gt; &#039;&#039;(send them through x,y,z and put them in a Vector3 type variable in the client function)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Player_block}}&lt;/div&gt;</summary>
		<author><name>ENN</name></author>
	</entry>
</feed>