Jump to content

XML stats system


myyusuf

Recommended Posts

EDIT: Someone was faster than me...

Myyusuf, since you don't know the SQL syntax I recommend you to use setAccountData which good enough for the beginning. The best solution is MySQL ofcourse but for you account data is way faster than XML.

Functions: (https://wiki.multitheftauto.com/wiki/Ser ... _functions)

addAccount 
copyAccountData 
getAccount 
getAccountData 
getAccountName  
getAccountPlayer 
getAccounts 
isGuestAccount 
logIn 
logOut 
removeAccount 
setAccountData 
setAccountPassword 

Link to comment

thanks for the answers guys :)

EDIT: Someone was faster than me...

Myyusuf, since you don't know the SQL syntax I recommend you to use setAccountData which good enough for the beginning. The best solution is MySQL ofcourse but for you account data is way faster than XML.

Functions: (https://wiki.multitheftauto.com/wiki/Ser ... _functions)

addAccount 
copyAccountData 
getAccount 
getAccountData 
getAccountName  
getAccountPlayer 
getAccounts 
isGuestAccount 
logIn 
logOut 
removeAccount 
setAccountData 
setAccountPassword 

thank you Sniper, but i am wondering when i restart script data will be losed?

Link to comment

Data will be saved in the account you select in setAcountData.

Maybe, you can edit data by handler like:

addEventHandler ( "onResourceStart", resourceRoot, 
     function ( ) 
         local g_pACC = getPlayerAccount ( player ) -- i know this code is wrong. It's only a example. 
         setAccountData ( g_pACC, "troll", "lol" ) 
     end 
) 

But if you're thinking about other thing, no. You can't.

Link to comment
On the server of course, it it was saved on client's PC, it would be really easy to change it.

so it will be saved on server files. if i move the server files to another hosting, the datas will be moved too?

no, u need move rigistry.db internal.db too

Edited by Guest
Link to comment
On the server of course, it it was saved on client's PC, it would be really easy to change it.

so it will be saved on server files. if i move the server files to another hosting, the datas will be moved too?

no, u need move rigistry.db too

okay now i get it. thank you for answering. :)

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