# getPathNodePosition (Shared)

> Returns a path node's position.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Shared
- **Category**: Roads and paths
- **URL**: https://wiki.mymp.gg/en/getPathNodePosition

## Syntax

```lua
vec3|false getPathNodePosition(int node [, bool lane = false])
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `node` | `int` | A node id, as the other path functions return it. |
| `lane` | `bool` | `true` moves the position off the middle of a road with a median to one side, where SA's scripts place cars. *(default: `false`)* |

## Returns

The node's position, or `false` if the node's area is not loaded.

## Example

```lua
local position = getElementPosition(localPlayer)
local node = getClosestPathNode(position.x, position.y, position.z)
if node then
    local lane = getPathNodePosition(node, true)
    setElementPosition(localPlayer, lane.x, lane.y, lane.z + 1)
end
```

## See also

- [getPathNodeInfo (Shared)](https://wiki.mymp.gg/en/getPathNodeInfo.md): Returns what is known about a path node.
- [getClosestPathNode (Shared)](https://wiki.mymp.gg/en/getClosestPathNode.md): Finds the road or footpath node closest to a point.
