Opening files outside the fivem folder

I’d like to open the txadmin playerDB.json file to query play time for the playing loading in to display on the loading screen. I’ve been trying some standard lua io commands but nothing is working. io,open returns nothing, doesn’t report an error so I assume the function is available. I’ve also driver os.execute running dir > file.txt do try to work out if rhe relative path is wrong.

First, does the built in modified lua build prevent standard file system IO or have an constraints?
What would the executing path be when running io.open(…), is it the resource location, server-data or the fxserver.exe folder?
Also is it possible to use other luarocks libraries?

1 Like