myyusuf Posted March 21, 2012 Share 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! Link to comment
TwiX! Posted March 21, 2012 Share Posted March 21, 2012 if xml file size >1mb , and 20players server will going down Link to comment
MIKI785 Posted March 21, 2012 Share Posted March 21, 2012 It's stupid to do it via XML, you should do it via SQL. It's much better. Link to comment
myyusuf Posted March 21, 2012 Author Share 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. Link to comment
MIKI785 Posted March 21, 2012 Share 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. Link to comment
drk Posted March 21, 2012 Share Posted March 21, 2012 For what is MTA Wiki? https://wiki.multitheftauto.com Link to comment
bandi94 Posted March 21, 2012 Share Posted March 21, 2012 use Account Data https://wiki.multitheftauto.com/wiki/Ser ... _functions Link to comment
-ffs-Sniper Posted March 21, 2012 Share 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 Link to comment
myyusuf Posted March 21, 2012 Author Share 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? Link to comment
drk Posted March 21, 2012 Share Posted March 21, 2012 Nop. You will save the data in the account. Not in the script or an array. Link to comment
myyusuf Posted March 21, 2012 Author Share 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? Link to comment
drk Posted March 21, 2012 Share 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. Link to comment
Moderators IIYAMA Posted March 21, 2012 Moderators Share Posted March 21, 2012 Small question: Where will account data being saved? On the server or on your own pc? Link to comment
Castillo Posted March 21, 2012 Share 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. Link to comment
myyusuf Posted March 22, 2012 Author Share 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? Link to comment
TwiX! Posted March 22, 2012 Share 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 Link to comment
myyusuf Posted March 22, 2012 Author Share 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. Link to comment
Alpha Posted March 22, 2012 Share 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. Link to comment
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