Saving System
#1

Hello,

I am pretty sure almost everyone knows about DayZSA gamemode, developed by kitten...
For some reason this mode has been using file-based saving system for saving player inventories, however as my server has a big amount of player everyday and alot of registrations and so on wso the number of files is growing very fast (approx 500k+ files).

I am thinking to move the system to mysql, for a better management and memory saving however i am a bit confused... on how to do it.

I've round about 80 inventory items, i want to save the items and its quantity a player had before leaving and then load it once he logs in... Anyone has any idea how can i save them?
Reply
#2

Yup, I switched to this a while ago, and pretty much, things are working fine for me, much much better than they used to,
at first, I was going to create a table where as for each row, I'll have 30 fields corresponding to player's inventory slots, but It sounded unnecessarily slow to me, so I checked up these 2 amazing tutorials by Vince
MySQL Table designs and foreign keys: https://sampforum.blast.hk/showthread.php?tid=420363
Saving weapon data (MySQL): https://sampforum.blast.hk/showthread.php?tid=505081

and oh boy, it was worth the switch.
Reply
#3

For the queries read the MySQL Reference Manual. (it contains everything you need in a query)
Also download BluG's and maddinat0r mysql plugin from here (github).
Reply
#4

Quote:
Originally Posted by 10MIN
Посмотреть сообщение
For the queries read the MySQL Reference Manual. (it contains everything you need in a query)
Also download BluG's and maddinat0r mysql plugin from here (github).
To be honest, useless reply.

@Oussama: Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)