Pathfind::getVehicleNodePosition

From RAGE Multiplayer Wiki
Jump to navigation Jump to search

Calling this with an invalid node id, will crash the game.
Note that IS_VEHICLE_NODE_ID_VALID simply checks if nodeId is not zero. It does not actually ensure that the id is valid.
Eg. IS_VEHICLE_NODE_ID_VALID(1) will return true, but will crash when calling GET_VEHICLE_NODE_POSITION().

sfink: This native returns a pointer to a packed Vector3 struct in the RAX register, as do the following natives:
AI::WAYPOINT_RECORDING_GET_COORD
ENTITY::GET_ENTITY_MATRIX
FIRE::GET_CLOSEST_FIRE_POS
GAMEPLAY::FIND_SPAWN_POINT_IN_DIRECTION
GAMEPLAY::GET_MODEL_DIMENSIONS
GAMEPLAY::OVERRIDE_SAVE_HOUSE
GAMEPLAY::_0x82FDE6A57EE4EE44
GAMEPLAY::_0x8BDC7BFC57A81E76
GAMEPLAY::_0x8D7A43EC6A5FEA45
GAMEPLAY::_0xA4A0065E39C9F25C
GAMEPLAY::_0xDFB4138EEFED7B81
MOBILE::GET_MOBILE_PHONE_POSITION
MOBILE::GET_MOBILE_PHONE_ROTATION
NETWORK::NETWORK_GET_RESPAWN_RESULT
OBJECT::_0x163F8B586BC95F2A
PATHFIND::GET_CLOSEST_MAJOR_VEHICLE_NODE
PATHFIND::GET_CLOSEST_ROAD
PATHFIND::GET_CLOSEST_VEHICLE_NODE
PATHFIND::GET_CLOSEST_VEHICLE_NODE_WITH_HEADING
PATHFIND::GET_NTH_CLOSEST_VEHICLE_NODE
PATHFIND::GET_NTH_CLOSEST_VEHICLE_NODE_FAVOUR_DIRECTION
PATHFIND::GET_NTH_CLOSEST_VEHICLE_NODE_WITH_HEADING
PATHFIND::GET_RANDOM_VEHICLE_NODE
PATHFIND::GET_SAFE_COORD_FOR_PED
PATHFIND::GET_VEHICLE_NODE_POSITION
PATHFIND::_0x16F46FB18C8009E4
VEHICLE::_0xA4822F1CF23F4810
VEHICLE::_0xDF7E3EEB29642C38
WATER::TEST_PROBE_AGAINST_ALL_WATER
WATER::TEST_PROBE_AGAINST_WATER
WEAPON::GET_PED_LAST_WEAPON_IMPACT_COORD
WORLDPROBE::_0xFF6BE494C7987F34
WORLDPROBE::_GET_RAYCAST_RESULT

Syntax

mp.game.pathfind.getVehicleNodePosition(nodeId, outPosition);

Required Arguments

  • nodeId: int
  • outPosition: Vector3

Return value

  • Vector3

Example

// todo

See also

Template:Pathfind s function c