Jump to content

setAccountData or setElementData?


TRANE152

Recommended Posts

setElementData will be kept as long as the element is not destroyed. So, when someone reconnects the player's ped will be deleted, just like his elementData. If you're using accountData, you'll be using the built-in account system from MTA. Which allows users to login and get their data back.

If you want to save weapons for reconnects etc, use setAccountData and getAccountData.

Link to comment

CIT is using a MySQL or sqlite not sure which. To keep data save and secure Arran wrote an own account-system. There for, you do need quite a few months of experience in lua and knowledge in other languages for ideas how to get it working etc.

For a starter, I would recommend doing; setAccountData ( getPlayerAccount ( thePlayer / source ), "ParamedicLevel", 2 )

Link to comment
For a starter, I would recommend doing; setAccountData ( getPlayerAccount ( thePlayer / source ), "ParamedicLevel", 2 )

The fact that I'm learning lua and still not very well get a hold of triggerClientEvent or triggerServerEvent (addEvent etc.)

By the way, I touched on this topic due to the fact that you had to get an account(getPlayerAccount(Server-only function)), but the script is written in a client-side.

Sorry for bad English skills.

Link to comment
For a starter, I would recommend doing; setAccountData ( getPlayerAccount ( thePlayer / source ), "ParamedicLevel", 2 )

The fact that I'm learning lua and still not very well get a hold of triggerClientEvent or triggerServerEvent (addEvent etc.)

By the way, I touched on this topic due to the fact that you had to get an account(getPlayerAccount(Server-only function)), but the script is written in a client-side.

Sorry for bad English skills.

you can get the account server sided and trigger it, it wouldn't be that hard to do. It only takes a few minutes before you will understand it fully, since you should also set the elementdata server sided, cause else it wont be synced with the other players. So ya, you should use some triggers. :)

Link to comment
you can get the account server sided and trigger it, it wouldn't be that hard to do. It only takes a few minutes before you will understand it fully, since you should also set the elementdata server sided, cause else it wont be synced with the other players. So ya, you should use some triggers. :)

Does not work ><

Can you write like this?

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