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

if xml file size >1mb , and 20players server will going down

357ac0078264.jpg

- Working on [php/HTML/Mysql/Lua/Java Scripts/Web Design/3D Modeling]

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.

Lua Scripter

?ucet=miki_cz

Owner of mshost.cz MTA portal.

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 

560x95_FFFFFF_FF9900_000000_000000.png

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.

EPT Team Server Development: 0%

Learning C++ | C++ is amazing xD

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.

EPT Team Server Development: 0%

Learning C++ | C++ is amazing xD

  • Moderators
Posted

Small question: Where will account data being saved? On the server or on your own pc?

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted

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

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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

357ac0078264.jpg

- Working on [php/HTML/Mysql/Lua/Java Scripts/Web Design/3D Modeling]

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

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