<?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=ChronosX88</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=ChronosX88"/>
	<link rel="alternate" type="text/html" href="https://wiki.rage.mp/wiki/Special:Contributions/ChronosX88"/>
	<updated>2026-06-23T19:26:43Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.rage.mp/w/index.php?title=Entity::remoteId&amp;diff=19671</id>
		<title>Entity::remoteId</title>
		<link rel="alternate" type="text/html" href="https://wiki.rage.mp/w/index.php?title=Entity::remoteId&amp;diff=19671"/>
		<updated>2020-06-07T21:08:11Z</updated>

		<summary type="html">&lt;p&gt;ChronosX88: Created page with &amp;quot;==Description== This property is used for getting shared entity ID. This ID is unique for an entity and &amp;#039;&amp;#039;&amp;#039;shared between serverside and clientside&amp;#039;&amp;#039;&amp;#039;.  ==Getter== * {{RageTyp...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
This property is used for getting shared entity ID. This ID is unique for an entity and &#039;&#039;&#039;shared between serverside and clientside&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Getter==&lt;br /&gt;
* {{RageType|Int}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Entity_definition}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Entity API]]&lt;br /&gt;
[[Category:Shared Property]]&lt;/div&gt;</summary>
		<author><name>ChronosX88</name></author>
	</entry>
	<entry>
		<id>https://wiki.rage.mp/w/index.php?title=Entity::id&amp;diff=19670</id>
		<title>Entity::id</title>
		<link rel="alternate" type="text/html" href="https://wiki.rage.mp/w/index.php?title=Entity::id&amp;diff=19670"/>
		<updated>2020-06-07T20:55:21Z</updated>

		<summary type="html">&lt;p&gt;ChronosX88: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{SharedPropertyJS}}&lt;br /&gt;
This property is used for getting an entity ID. The ID is a unique identifier for the entity.&lt;br /&gt;
&lt;br /&gt;
{{Note|A server-side ID is NOT the same as a client-side ID. Use [[Entity::remoteId|remoteId]] property if you want it to match the server-side ID.}}&lt;br /&gt;
&lt;br /&gt;
==Getter==&lt;br /&gt;
* {{RageType|Int}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
This event will log to the console the players name and the ID they have been assigned [[PlayerJoin|when joining the server]].&lt;br /&gt;
{{ServersideCode|&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mp.events.add(&amp;quot;playerJoin&amp;quot;, (player) =&amp;gt; {&lt;br /&gt;
	console.log(`${player.name} has joined. [${player.id}]`);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Entity_definition}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Entity API]]&lt;br /&gt;
[[Category:Shared Property]]&lt;/div&gt;</summary>
		<author><name>ChronosX88</name></author>
	</entry>
	<entry>
		<id>https://wiki.rage.mp/w/index.php?title=Raycasting::testPointToPoint&amp;diff=19669</id>
		<title>Raycasting::testPointToPoint</title>
		<link rel="alternate" type="text/html" href="https://wiki.rage.mp/w/index.php?title=Raycasting::testPointToPoint&amp;diff=19669"/>
		<updated>2020-06-07T19:46:40Z</updated>

		<summary type="html">&lt;p&gt;ChronosX88: fix example of return value&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ClientsideJsFunction}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
This function casts a ray from Point1 to Point2 and returns the position and entity of what&#039;s in the way, or undefined if the way is cleared.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Flags are intersection bit flags.  They tell the ray what to care about and what not to care about when casting. Passing -1 will intersect with everything, presumably.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Flags:&amp;lt;br&amp;gt;1: Intersect with map&amp;lt;br&amp;gt;2: Intersect with vehicles (used to be mission entities?) (includes train)&amp;lt;br&amp;gt;4: Intersect with peds? (same as 8)&amp;lt;br&amp;gt;8: Intersect with peds? (same as 4)&amp;lt;br&amp;gt;16: Intersect with objects&amp;lt;br&amp;gt;32: Unknown&amp;lt;br&amp;gt;64: Unknown&amp;lt;br&amp;gt;128: Unknown&amp;lt;br&amp;gt;256: Intersect with vegetation (plants, coral. trees not included)&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;NOTE: Raycasts that intersect with mission_entites (flag = 2) has limited range and will not register for far away entites. The range seems to be about 30 metres. &lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mp.raycasting.testPointToPoint(pos1, pos2, [ignoredEntity], [flags])&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Required arguments ===&lt;br /&gt;
*&#039;&#039;&#039;pos1:&#039;&#039;&#039; Vector3&lt;br /&gt;
*&#039;&#039;&#039;pos2:&#039;&#039;&#039; Vector3&lt;br /&gt;
&lt;br /&gt;
=== Optional arguments ===&lt;br /&gt;
*&#039;&#039;&#039;ignoredEntity:&#039;&#039;&#039; Entity handle or object - example: mp.players.local&lt;br /&gt;
*&#039;&#039;&#039;flags:&#039;&#039;&#039; Int representing sum of flags - example: 17 (intersect with map [1] and objects [16])&lt;br /&gt;
&lt;br /&gt;
=== Return value ===&lt;br /&gt;
*&#039;&#039;&#039;object&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example of return object&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;position&amp;quot;: {&lt;br /&gt;
		&amp;quot;x&amp;quot;: 13.01,&lt;br /&gt;
		&amp;quot;y&amp;quot;: 12.23,&lt;br /&gt;
		&amp;quot;z&amp;quot;: 70.02&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;surfaceNormal&amp;quot;: {&lt;br /&gt;
		&amp;quot;x&amp;quot;: 0.93,&lt;br /&gt;
		&amp;quot;y&amp;quot;: -0.04,&lt;br /&gt;
		&amp;quot;z&amp;quot;: -0.34&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;entity&amp;quot;: &amp;lt;entity object&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
{{ClientsideCode|&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mp.events.add(&#039;render&#039;, () =&amp;gt; {&lt;br /&gt;
	const startPosition = mp.players.local.getBoneCoords(12844, 0.5, 0, 0);&lt;br /&gt;
	const endPosition = new mp.Vector3(0, 0, 75);&lt;br /&gt;
&lt;br /&gt;
	const hitData = mp.raycasting.testPointToPoint(startPosition, endPosition);&lt;br /&gt;
	if (!hitData) {&lt;br /&gt;
		mp.game.graphics.drawLine(startPosition.x, startPosition.y, startPosition.z, endPosition.x, endPosition.y, endPosition.z, 255, 255, 255, 255); // Is in line of sight&lt;br /&gt;
	} else {&lt;br /&gt;
		mp.game.graphics.drawLine(startPosition.x, startPosition.y, startPosition.z, endPosition.x, endPosition.y, endPosition.z, 255, 0, 0, 255); // Is NOT in line of sight&lt;br /&gt;
	}&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This function returns undefined or a valid result, if you point with your camera on something. &lt;br /&gt;
{{ClientsideCode|&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function pointingAt(distance) {&lt;br /&gt;
    const camera = mp.cameras.new(&amp;quot;gameplay&amp;quot;); // gets the current gameplay camera&lt;br /&gt;
&lt;br /&gt;
    let position = camera.getCoord(); // grab the position of the gameplay camera as Vector3&lt;br /&gt;
&lt;br /&gt;
    let direction = camera.getDirection(); // get the forwarding vector of the direction you aim with the gameplay camera as Vector3&lt;br /&gt;
&lt;br /&gt;
    let farAway = new mp.Vector3((direction.x * distance) + (position.x), (direction.y * distance) + (position.y), (direction.z * distance) + (position.z)); // calculate a random point, drawn on a invisible line between camera position and direction (* distance)&lt;br /&gt;
&lt;br /&gt;
    let result = mp.raycasting.testPointToPoint(position, farAway, null, 17); // now test point to point - intersects with map and objects [1 + 16]&lt;br /&gt;
&lt;br /&gt;
    return result; // and return the result ( undefined, if no hit )&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Worldprobe_s_function_c}}&lt;br /&gt;
[[Category:Clientside API]]&lt;/div&gt;</summary>
		<author><name>ChronosX88</name></author>
	</entry>
</feed>