myyusuf Posted March 21, 2012 Posted March 21, 2012 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!
TwiX! Posted March 21, 2012 Posted March 21, 2012 if xml file size >1mb , and 20players server will going down - Working on [php/HTML/Mysql/Lua/Java Scripts/Web Design/3D Modeling]
MIKI785 Posted March 21, 2012 Posted March 21, 2012 It's stupid to do it via XML, you should do it via SQL. It's much better. Lua Scripter Owner of mshost.cz MTA portal.
myyusuf Posted March 21, 2012 Author Posted March 21, 2012 It's stupid to do it via XML, you should do it via SQL. It's much better. you are right but i dont know to use SQL.
MIKI785 Posted March 21, 2012 Posted March 21, 2012 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 Owner of mshost.cz MTA portal.
drk Posted March 21, 2012 Posted March 21, 2012 For what is MTA Wiki? https://wiki.multitheftauto.com EPT Team Server Development: 0% Learning C++ | C++ is amazing
bandi94 Posted March 21, 2012 Posted March 21, 2012 use Account Data https://wiki.multitheftauto.com/wiki/Ser ... _functions Ingame Name : |DGT|Puma DGT Clan Server 24/7 Owner/Scripter MultiGameMode in progress :
-ffs-Sniper Posted March 21, 2012 Posted March 21, 2012 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
myyusuf Posted March 21, 2012 Author Posted March 21, 2012 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?
drk Posted March 21, 2012 Posted March 21, 2012 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
myyusuf Posted March 21, 2012 Author Posted March 21, 2012 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?
drk Posted March 21, 2012 Posted March 21, 2012 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
Moderators IIYAMA Posted March 21, 2012 Moderators Posted March 21, 2012 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 Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Castillo Posted March 21, 2012 Posted March 21, 2012 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. Education is the most powerful weapon which you can use to change the world.
myyusuf Posted March 22, 2012 Author Posted March 22, 2012 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?
TwiX! Posted March 22, 2012 Posted March 22, 2012 (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 March 22, 2012 by Guest - Working on [php/HTML/Mysql/Lua/Java Scripts/Web Design/3D Modeling]
myyusuf Posted March 22, 2012 Author Posted March 22, 2012 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.
Alpha Posted March 22, 2012 Posted March 22, 2012 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. My Resources: [REL] Support System v1.0.2
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now