Jump to content

Questions about saving data, client-side safe etc


Verius

Recommended Posts

Hello MTA community, I've some questions about a methods of saving the data(optimization) and variables security. 
So, I am wondering how as optimally saving the players data in memory. For example: I've a lot extensive resources (equipment, abilities and more complex stats, etc etc), and when player's successful logging, server's getting data from MySQL database. I don't know, what is better solution - (1) saving all of these data in server-side bigggg table and getting by client in server events handlers, or maybe saving some data in client-side table (e.g individual stats about stamina level, abilities etc)  <- but I don't know how safe is saving data in client memory. - or (2) saving all by means of elementData.
And here's my primary questions - Which solution's better? Is client-side enough safe for saving important data in ordinary variables? And how it looks from optimization? (e.g on server is 400-players, and all of them have a tens[e.g 20] individual data. So if I used elementData, it's can count about 8000 elementData [players=400 * data=20]. And of course, 8000 elementData is only for players, you have to add elementData for vehicles, other 'systems' etc, too. Will it not do lags or something?)

Thanks for any responses. 

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