A FiveM resource for selecting and copying Vector3 coordinates with a visual marker. Supports both clipboard copy and export functionality for other scripts.
- 🎯 Visual marker that follows your camera aim
- 📋 Copy coordinates directly to clipboard
- 🔌 Export function for integration with other scripts
- 🎨 Persistent UI instructions using ox_lib
- 🔴 Red sphere marker for precise coordinate selection
- ox_lib - Required for clipboard, notifications, and UI
- Download and place the resource in your server's
resourcesfolder - Ensure ox_lib is installed and started before this resource
- Add to your
server.cfg:
ensure ox_lib
ensure pulsar-advencedcoordsUse the /coords command to activate coordinate selection:
- Type
/coordsin chat - A red marker will appear where your camera is pointing
- Move your camera to position the marker where you want
- Press E to copy the coordinates to your clipboard
- Paste the coordinates anywhere (format:
vector3(x, y, z))
Use the export function to integrate coordinate selection into your own scripts:
exports['pulsar-advencedcoords']:selectCoords(function(coords)
-- coords is a vector3 object
print('Selected coordinates:', coords)
print('X:', coords.x, 'Y:', coords.y, 'Z:', coords.z)
end)- The script uses raycasting from the camera to detect surfaces
- A red marker (sphere) is drawn at the raycast hit point
- If no surface is detected, the marker appears 2 units in front of the player
- When E is pressed:
- Command mode: Coordinates are copied to clipboard with notification
- Export mode: Coordinates are passed to the callback function
You can modify the following in client/client.lua:
- Marker distance: Change
local distance = 10.0(line 43) - Fallback distance: Change
markerCoords = playerCoords + camDir * 2.0(line 52) - Marker appearance: Modify the
DrawMarkerparameters (line 56) - Key binding: Change
IsControlJustPressed(0, 38)(line 60) - 38 is E key
Free to use and modify.
- Author: Flitcher
- Version: 1.0.0