5Mdev
All Snippets
Lua Snippet

FiveM Coordinate & Heading Grabber (Client-Side)

·Published 20 Aug 2026·0 likes·0 comments

Description & Usage

A FiveM developer tool to print the player's current ⁠vector3⁠ position and heading into the F8 console for easy copy-pasting into FiveM config files.

Source Code (1 File)
1RegisterCommand('coords', function()
2 local ped = PlayerPedId()
3 local coords = GetEntityCoords(ped)
4 local heading = GetEntityHeading(ped)
5 print(string.format("FiveM Position: vector3(%.2f, %.2f, %.2f) | Heading: %.2f", coords.x, coords.y, coords.z, heading))
6end, false)
0 likes ·Sign in to like
0 discussion replies

Community Discussion (0)

Sign in to join the discussion and leave a comment.