All Snippets
Lua Snippet
FiveM Coordinate & Heading Grabber (Client-Side)
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)
| 1 | RegisterCommand('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)) |
| 6 | end, false) |
0 likes ·Sign in to like
Community Discussion (0)
Sign in to join the discussion and leave a comment.
Snippet Info
LanguageLua
Lines6
Chars290
Likes0