Saving player information -
EtayJ - 20.08.2016
Hey, I understand that in order to store player information you have to use MySQL or a file system, but if I use the MySQL method, is there a limit to how many stuff I can have there? I plan on storing every single player info there, such as a faction, player items, cars, etc.
I was also wondering, if player X has 30 cars on his account, how would I be able to put them in one field but when loading/saving make the script be able to identify that he has 30 cars.
Re: Saving player information -
oMa37 - 20.08.2016
Depends on the database size.
Re: Saving player information -
EtayJ - 21.08.2016
Quote:
Originally Posted by oMa37
Depends on the database size.
|
Can I make it unlimited? Because I do not want to limit the amount of players to be registered.
Re: Saving player information -
K0P - 21.08.2016
Its according to the amount of storage you buy like in 1 GB MySQL you can store over 500 heavy roleplay accounts.
Re: Saving player information -
EtayJ - 21.08.2016
Quote:
Originally Posted by K0P
Its according to the amount of storage you buy like in 1 GB MySQL you can store over 500 heavy roleplay accounts.
|
I see, and if I choose to store only sensitive information (passwords, salt, etc) in MySQL and other player data in an XML/Json/Yml data format, is that possible? Which plugins allow it?
Re: Saving player information -
Skimmer - 21.08.2016
You can use JSON format to save 30 vehicles in one field.
More info about JSON:
https://www.copterlabs.com/json-what...how-to-use-it/
EDIT: Here's a plugin by KingHual for that.
https://sampforum.blast.hk/showthread.php?tid=543919
Re: Saving player information -
PrO.GameR - 21.08.2016
Do not give random bs to people if you don't understand anything.
1GB data is
way way way more than 500 accounts, my 50 or something tables + 10 data in each file dump is 38kb for comparison.
http://dev.mysql.com/doc/refman/5.7/...uirements.html
About saving 30 cars in 1 field, you should never do that, but rather use a proper db structure.
https://sampforum.blast.hk/showthread.php?tid=609888
https://sampforum.blast.hk/showthread.php?tid=420363
https://sampforum.blast.hk/showthread.php?tid=505081
Here are 3 tutorials by Vince on how to normalize your database.
You can create a table for their cars, their items their weapons and w/e, if they are only part of 1 faction you can add a field in main table, if not, create a seprate table.
Then associate tables to each other accordingly.