[Release] Player coords saver to .Txt

so hostile…I use mello trainer with it because its quicker and faster… instead of using /noclip or the es_extended (HOME key UI)…

I have scripthook disabled…plus I’m the only one that is allowed to use mello trainer on my server.
No trainer based stuff on mine brother…pure ESX.

how did u fix that?

IGNORE:
the post need to be at least 20 char aaaaaaaa

@Fernando_Picoral

1 Like

Something was wrong with the function that reads the /pos command

I’ve tried the Coordsaver V2, does not work. and I tried Flatracer’s version. DOnt work. Wont save me anything at all :stuck_out_tongue:

it works for me… he failed to mention that you must type /savepos and a comment so for example /savepos firestation then in the text file in the saved folder it tells you your comment next to the coordinates so when you go to read the coordinates it says what that was so you know as a reference when you have multiple inputs. @Flatracer Thank you for this script going to help me a lot with changing and adding locations also, it said error 404 when booting it up. apparently, you renamed it on your GitHub. I took the liberty of fixing it on my end. here is the fix.server.lua (3.4 KB)

Does not work.

Error running system event handling function for resource coordsaver: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: server.lua:28: attempt to index a nil value (global ‘file’)
stack traceback:
server.lua:28: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:175: in function citizen:/scripting/lua/scheduler.lua:174
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:41: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:174: in function citizen:/scripting/lua/scheduler.lua:138

It says “system: This command has been removed” -.- I am using ESX. Any ideas?

You have to rename the command in the playercoords resource. ESX has his own position saver, and it’s the same command.

When I enter the / pos command, the error “This command is removed” pops up

You guys must do it this way /savepos firestation sandy shores or /savepos 24/7 mirror park u must use the /savepos and then name it something /savepos pointa I have been using this forever now and its always worked…coordsaver.zip (2.8 KB) also note that i use esx on my server and this works just fine…

1 Like

Error running system event handling function for resource coordsaver: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: server.lua:10: attempt to index a nil value (global ‘file’)
stack traceback:
server.lua:10: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:219: in function citizen:/scripting/lua/scheduler.lua:218
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:41: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:218: in function citizen:/scripting/lua/scheduler.lua:182

i have the same error

It says pos is not a valid command

Amazing works perfect thx mate for this, save a lot time.

Simple serverside working 4 me:

RegisterCommand("printcoords", function(source, args, rawCommand)
	local coords = GetEntityCoords(GetPlayerPed(source))
    file = io.open( './coords.txt', "a")
    if file then
		file:write("{" .. coords.x .. ",".. coords.y .. "," .. coords.z .. "},")
		file:write("\n")
    end
    file:close()
end)

I’m having the problem of io being nil… How to fix this or use io nowadays ?

Thanks

Make sure your steam name doesn’t have any special characters I just had this issue myself where it said global ‘file’ nil. After removing my special characters from my steam name it worked just fine.

1 Like

This was what I was looking for, thank you so much

1 Like