Jump to content

Most efficient way to temporarily hold information


pa3ck

Recommended Posts

Hey,

So I'm making an RP gamemode from scratch for a fairly big community. I cant decide how and what way should I share the information between players like accountID, items, age etc etc. At the moment all of these details are being saved temporarily with setElementData. I'm using MySQL but I don't think having a direct MySQL connection with the client is efficient. For example loading a particular vehicle's details like owner, database ID etc, I'm using elementdata, I'm not getting the data from MySQL each time a player enters a car. Each player has about 30 elementdatas and other elements like vehicle, markers etc have some as well. So we are talking about couple of thousands of elementdatas. I'm looking for some experienced people's opinion and idea on what way would it be the most efficient, keeping in mind that I don't want to overload the server either.

Link to comment

If some data isn't required to be displayed / synced all the time for every client, it's more efficient to save that stuff into tables and trigger to client when required.

If you're scared of a lot of MySQL requests, don't worry, the server is made to work properly under high load. Sites poll MySQL very often though work absolutely fine

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