Jump to content

XML stats system


myyusuf

Recommended Posts

Posted

hello scripters, i have a stats script that worked on XML system. so i wanted to make top list. like a top wins, 2nd, 3th, points. if anyone can make that for fair price, pm me!

Posted

Then, search on google for tutorials and learn, then download some free scripts with SQL and see how it works, then you should know how to do it yourself.

Posted

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 

Posted

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?

Posted
Nop. You will save the data in the account. Not in the script or an array.

thanks for answering. so where will the data saved? also can i will edit the data by handler?

Posted

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.

Posted
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?

Posted (edited)
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
Posted
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. :)

Posted

The accounts and accounts data are saved in internal.db, if you move that file with the server, you will get all the accounts and the accounts data.

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