Pathfind::getStreetNameAtCoord: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
(yay)
Line 1: Line 1:
Determines the name of the street which is the closest to the given coordinates.<br><br>x,y,z - the coordinates of the street<br>streetName - returns a hash to the name of the street the coords are on<br>crossingRoad - if the coordinates are on an intersection, a hash to the name of the crossing road<br><br>Note: the names are returned as hashes, the strings can be returned using the function UI::GET_STREET_NAME_FROM_HASH_KEY.
Determines the name of the street which is the closest to the given coordinates.<br><br>x,y,z - the coordinates of the street<br>streetName - returns a hash to the name of the street the coords are on<br>crossingRoad - if the coordinates are on an intersection, a hash to the name of the crossing road<br><br>Note: the names are returned as hashes, the strings can be returned using the function UI::GET_STREET_NAME_FROM_HASH_KEY.
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">pathfind.getStreetNameAtCoord(x, y, z, streetName, crossingRoad);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.pathfind.getStreetNameAtCoord(x, y, z, streetName, crossingRoad);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''x:''' float
*'''x:''' float
Line 12: Line 12:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
todo
// todo
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Pathfind_function_c}}
{{Pathfind_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Revision as of 21:28, 6 May 2017

Determines the name of the street which is the closest to the given coordinates.

x,y,z - the coordinates of the street
streetName - returns a hash to the name of the street the coords are on
crossingRoad - if the coordinates are on an intersection, a hash to the name of the crossing road

Note: the names are returned as hashes, the strings can be returned using the function UI::GET_STREET_NAME_FROM_HASH_KEY.

Syntax

mp.game.pathfind.getStreetNameAtCoord(x, y, z, streetName, crossingRoad);

Required Arguments

  • x: float
  • y: float
  • z: float
  • streetName: Hash
  • crossingRoad: Hash

Return value

  • object: streetName, crossingRoad

Example

// todo

See also

Template:Pathfind s function c