Save money to .txt file?



I recently have been trying to make it so when a player joins, they have 0 money, and it saves their money to a .txt file, so when they rejoin. They have the money that was saved to the .txt file.
I have tried using these natives:
But miserably failed, any help appreciated.


[Release] Player total online time counter - FILE or SQL SAVE

What have you tried exactly because those natives are the right ones to read and write to files.

In case you don’t want to use natives you can also use LUA I/O functions, but they require you to specify a specific file path and apparently this only works for windows, at least some people using ubuntu complained that it didn’t work.


Is there any examples with FiveM?


[Release] vHelp (v2.0) - Simple /help and /rules script checkout the " v1.2 info (OLD VERSION, UPGRADE TO V2.0 WHENEVER POSSIBLE)" spoiler, the download for the old version is still up which includes a lua IO example