Coordinates are everywhere in FiveM configuration โ placing a shop, defining a job location, setting a spawn point, creating a safe zone. Knowing how to grab the exact coordinates you need is a fundamental skill. Here's how.
What coordinates look like in FiveM
FiveM uses the game world's coordinate system, expressed as vector3 values: an X, Y, and Z position. You'll see them written like:
vector3(-254.12, -971.48, 31.22)- X and Y are the horizontal position on the map
- Z is the height (elevation)
Many configs also want a heading (the direction something faces), a value from 0 to 360.
Method 1: Use a coordinates command/script
The easiest way is a small resource or command that prints your current coordinates. Many admin menus and developer tools include a "copy coords" feature. When you stand where you want and trigger it, it gives you the exact vector3 (and often the heading) to paste into a config.
There are lightweight standalone "vector" or "coords" developer resources built exactly for this โ you run one, stand where you want, and it copies the coordinates to your clipboard.
Method 2: Admin menu tools
Many admin menus (and framework admin tools) have a built-in option to display or copy your current position. If you're running one, check for a "show coordinates" or "copy vector3" option โ it's often already there.
Method 3: Native command approach
Some setups let you print coordinates via console or a bound command that calls the game's position natives. If you have developer tools enabled, this is quick.
Getting the heading too
For things that face a direction โ a spawned ped, a spawn point, a shop clerk โ you also need the heading. Good coordinate tools give you heading alongside the vector3. Stand facing the exact direction you want before grabbing it.
Using coordinates in a config
Once you have them, paste into the relevant config. The format depends on the script, but you'll commonly see:
coords = vector3(-254.12, -971.48, 31.22),
heading = 90.0,or sometimes vector4 (which bundles the heading):
vector4(-254.12, -971.48, 31.22, 90.0)Match whatever format the script's config uses โ check the existing examples in that config file.
Tips for accurate placement
- Stand exactly where you want the thing to be before grabbing coords.
- Mind the Z (height) โ being on a slope or step changes it. For things on the ground, make sure you're standing on the actual ground.
- Face the right way before capturing heading.
- Test in-game after adding โ spawn/reload and check the placement is right, adjust if needed.
Coordinates and quality scripts
Well-designed scripts make placement easy โ clear config formats, sometimes in-game placement tools so you don't hand-edit coords at all. Viper Safe-Zone includes an in-game polygon creator, so you can place safezones visually rather than copying coordinates by hand.