Stanley Sathler Posted May 5, 2012 Share Posted May 5, 2012 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
jeremaniak Posted May 5, 2012 Share Posted May 5, 2012 I prefer mysql thats not that hard and its nice Link to comment
Stanley Sathler Posted May 5, 2012 Author Share Posted May 5, 2012 Jeremaniak, but MySQL is more fast? Or not? Link to comment
AGENT_STEELMEAT Posted May 5, 2012 Share Posted May 5, 2012 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
Stanley Sathler Posted May 5, 2012 Author Share Posted May 5, 2012 Oh John, I liked your details. I will not use on others services, but I'm trying choose by the more secure and faster. Peace, Stanley Sathler. Link to comment
Michael# Posted May 6, 2012 Share Posted May 6, 2012 I prefer MySQL, it's easy to use and manage. Don't use account data for RPG. Link to comment
hxv Posted May 6, 2012 Share Posted May 6, 2012 You can use also xml instead of MySQL. Link to comment
jeremaniak Posted May 6, 2012 Share Posted May 6, 2012 Mysql is ver easy to see all your tables fast Link to comment
Michael# Posted May 6, 2012 Share Posted May 6, 2012 You can use also xml instead of MySQL. You mad? Link to comment
hxv Posted May 6, 2012 Share Posted May 6, 2012 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
AGENT_STEELMEAT Posted May 6, 2012 Share Posted May 6, 2012 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
Stanley Sathler Posted May 6, 2012 Author Share Posted May 6, 2012 Jesus, I loved the answers! If I choose MySQL, I just must install the MySQL in my Host (like I install to use in a web page, for example) or I must use a special configuration to use with MTA? Link to comment
Michael# Posted May 6, 2012 Share Posted May 6, 2012 Use the built-in (My)SQL functions ( dbConnect, dbQuery, dbPoll, etc ) and install a MySQL Server on the machine. Link to comment
AGENT_STEELMEAT Posted May 6, 2012 Share Posted May 6, 2012 You can install the MySQL server anywhere you want (I suggest you keep it on the same machine), just point to it in your script. Link to comment
Stanley Sathler Posted May 6, 2012 Author Share Posted May 6, 2012 Oh yes, so I'll use MySQL. Thanks to everybody who posted here. Link to comment
hxv Posted May 6, 2012 Share Posted May 6, 2012 Im not sure that xml is a bad way. You can use my xmldb. Thank's xmldb you can make your databases in xml file. https://community.multitheftauto.com/index.php?p= ... ls&id=2250 Link to comment
Michael# Posted May 6, 2012 Share Posted May 6, 2012 Dude, never try XML, unless you want to download 20MB of XML file with players data. Also, it will lag the server, I think. Link to comment
Jaysds1 Posted May 6, 2012 Share Posted May 6, 2012 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now