PlayerCreateWaypoint: Difference between revisions

From RAGE Multiplayer Wiki
m (category)
(Fixes params)
Line 1: Line 1:
'''DOES NOT SEEM TO WORK IN CURRENT 0.3.7 VERSION'''


Event triggered when a player creates a waypoint
Event triggered when a player creates a waypoint in the map.


==Parameters==
==Parameters==
* '''player'''
* '''position''': Vector3 position of the waypoint
* '''position''', Vector3 position of the waypoint


==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
mp.events.add("playerCreateWaypoint", (player, position) => {
mp.events.add("playerCreateWaypoint", (position) => {
  // Do what you want.
  mp.console.logInfo(`New waypoint created at: ${position.x}, ${position.y}, ${position.z}`);
});
});
</syntaxhighlight>
</syntaxhighlight>
Line 16: Line 14:


[[Category:Waypoint]]
[[Category:Waypoint]]
[[Category:Server-side Event]]
[[Category:Client-side Event]]
[[Category:Client-side Event]]

Revision as of 22:35, 24 February 2020

Event triggered when a player creates a waypoint in the map.

Parameters

  • position: Vector3 position of the waypoint

Example

mp.events.add("playerCreateWaypoint", (position) => {
 mp.console.logInfo(`New waypoint created at: ${position.x}, ${position.y}, ${position.z}`);
});