Jump to content

AccountData() functions are recommended for use in RPG's?


Recommended Posts

Hi guys,

In the last weeks I have been thinking about make a RPG mode. In gamemodes of this type, the server must save many informations, like current money, weapons, cars, current skin, current position on map (when the player leave the server) and much more.

I would like to know: the functions setAccountData() and getAccountData() are recommended to do it? Or I must use MySQL (example) for save these informations? I would like to know the more details possible.

Thx for the patience,

Stanley Sathler.

Link to comment

Depends - what sort of functionality do you want in your gamemode?

Do you want player's account data to be easily available to other services (i.e a web server, or another MTA server)? Use MySQL.

Otherwise, use the internal account functions for storing account data.

It's not so much about performance as much as it is about proper usage.

Link to comment

Why? xml is very popular in these times, there are few ways to store your data:

- MySQL

- xml

- or your own unknown way ( I have created one time file with .data format and scripted it to little database )

Link to comment

Account data is fine for basic RPG modes that don't need to share data across services. They are integrated into MTA, so they are easier to use, and they are just as efficient (in terms of latency between the server and database) if not more than MySQL.

XML should not be used for account data - XML is meant to store small amounts of data, i.e the elements of a map or the settings of a gamemode. Using XML in places where there will be a lot of read/write accesses is just a bad idea, not to mention it's very inefficient.

Also, it is just as easy to view account data/SQLite tables as it is MySQL, you just need to download the SQLite browser (or implement your own GUI in MTA, which is also quite easy).

Link to comment
Dude, never try XML, unless you want to download 20MB of XML file with players data.

Also, it will lag the server, I think.

it will lag the server, slow your computer and might even give the server lack of details about the player,

I suggest using MySQL or the built in Account Data.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...