Jump to content

[HELP] ElementData Problem


Recommended Posts

Posted

 

Hi guys

I have a problem, can you solve it?

My problem is that when players on ElementData have not been saved to my server!

For example, I was setElementData (thePlayer, "faction", police), and when I got out of the server and entered the server again, I was no longer in the police faction.

please help.

 

 

Posted

MTA isn't have built-in elementdata save, you have to do it manually. I recommend mysql.

dbConnect
dbExec
dbQuery
onPlayerQuit

And when the player joins you have to set those element datas with the result you get with query. 

Posted (edited)

you can use setAccountData and getAccountData. It will be mush easier than databases for you :3

Edited by JeViCo
  • Discord Moderators
Posted

If you literally want to save every element data the client had(has) you can use getAllElementData and just store it.

 

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