SA-MP Forums Archive
Saving System - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Saving System (/showthread.php?tid=639861)



Saving System - iLearner - 24.08.2017

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?


Re: Saving System - Eoussama - 24.08.2017

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.


Re: Saving System - 10MIN - 24.08.2017

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).


Re: Saving System - iLearner - 24.08.2017

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!