[Release] Fenwick's lightweight position suite

Howdy,

This is a quick and dirty little position suite I wrote up to be able to access normally inaccessible areas of the map. It also allows quick teleportation to various preset locations of your choosing.

Please note that this resource in and of itself does not open interiors. For that, you need a separate resource such as @Bob_74’s Fix holes in the map.

This resource adds the following commands via text chat:

/position
Displays your raw position data via text chat. (Useful for getting coordinates to add to /goto)
EXAMPLE: N/A

/goto ?
Lists all locations stored in cl_utility.lua locations table.
EXAMPLE: N/A

/goto [arg]
Goes to a predefined location set up by you in cl_utility.lua via the locations table.
EXAMPLE: /goto test1

/goto coords x y z
Goes directly to the X Y and Z positions given.
EXAMPLE: /goto coords 1 1 1

The static locations are configurable in cl_utility.lua. Two test locations are included by default just to illustrate the structure of the table. Be warned that both test1 and test2 will take you to invalid locations.

position.zip (2.5 KB)

1 Like

For some reason none of the commands do anything… no errors or anything

Update: i deleted cache.same issue

i am on FXServer

Hey! Assuming you have it installed correctly and set to autostart, the most likely source of your problem is an edit to the locations table. Ensure you’ve used quotation marks (" ") around the name of each entry and have separated your x, y and z data with commas. If that isn’t the problem, let me know and give me some other info like any other edits you’ve made to the scripts.

EDIT: Oops, meant (’ '), not (" ") above. Sorry, slipped by me.

locations[‘sandyshorespd’] = {x = 1857.5590820313, y = 3680.1794433594, z = 33.783832550049}
locations[‘sandyshoresciv’] = {x = 1935.0216064453, y = 3722.666015625, z = 32.853538513184}
locations[‘paletobaypd’] = {x = -440.53149414063, y = 6019.2158203125, z = 31.490114212036}
locations[‘paletobayciv’] = {x = -2.1600048542023,y = 6518.501953125, z = 31.473566055298}
locations[‘missinrowpd’] = { x = -429.98153686523, y = -982.35174560547,z = 30.710432052612}
locations[‘missinrowciv’] = {x - -416.78955078125, y = -807.81793212891,z = 29.382726669312}

I copied what you had and changed the names / coords

Is the server picking up the chatMessage event? To test for this, open up sv_utility.lua and insert a new line beneath CancelEvent(). On the blank new line, add TriggerClientEvent(‘chatMessage’, source, “DEBUG”, {0, 0, 255}, “Triggered” ) It should look like this:

CancelEvent()
TriggerClientEvent('chatMessage', source, "DEBUG", {0, 0, 255}, "Triggered" )
TriggerClientEvent('showPosition', source)

If the server is triggering properly, when you use /position in-game, “DEBUG: Triggered” should appear in the chat window. If this works, it means the problem is somewhere in the client script or elsewhere, but it will give a starting point for further investigation.