Gamemode money...

I know that this is old theme but i need some examples on how to add a money system into gamemode…
I need remove money, add money and set money scripts… also Save and Load scripts…
Can anyone help?

I can lua code.

I am also interested in the Save / Load script :stuck_out_tongue:

For Save/Load:

For Money:

Always check the wiki :wink:

Aww thanks you very much man!!!
This solves most of my problems…
About the wiki, i looked at the wiki but not everywhere =)

Don’t use file library to save and load money, use to save and to load.

Aaand what if the server crashes?

Exactly. In order to use that properly you’d need to combine that with file.write, but why bother when you can just use file.write alone.

Use SQL :]

More like SQLite, else you would need to buy an extra server/install MySQL.

Or a computer that is constantly running XAMPP

Which my computer is doing ^^

This would be complete fail XAMPP is really bad and so is WAMP either compile MySQL yourself or dont bother also you can get free MySQL hosting that would be much faster and more convinient off the web using your own PC to host a database will end in fail

No matter what you do there’s always the possibility of losing data when crashing.

Depending how you set it up. If you set up the data while playing then the data will still be stored either direct reading (from txt files) or SQLite or some other way. But ofc there is possibilities that you will loose it.