Taalasmaa Posted April 24, 2010 Share Posted April 24, 2010 (edited) Hello, I started to work with mta account libraries. Now everybody can store datas so easily. The script is automated storage system, players can save their datas maybe too easily. Very good for newbies. So basically, it just storage your datas automatically: Some examples how to use classes: Example1: function quitData(player) storeQuitData(player,"money") -- or -- storeQuitData(player,"wanted") -- or -- storeQuitData(player,"weapons") end addEventHandler("onPlayerQuit",getRootElement(),quitData) Example2: function cmd1(player) storeCommandData(player,"money") end addCommandHandler("storeMyMoney",cmd1) Example3: function loginData(player) loadLoginData(player,"money") -- automatically sets the player money! -- end addEventHandler("onPlayerLogin",getRootElement(),loginData) The script is still work in progress. Leave a comment if you want to give some ideas etc. Hope you like it Regards Taalasmaa Edited April 25, 2010 by Guest Link to comment
x86 Posted April 24, 2010 Share Posted April 24, 2010 These examples are no classes, lol Link to comment
Taalasmaa Posted April 24, 2010 Author Share Posted April 24, 2010 These examples are no classes, lol No -.- But these examples are EXAMPLES HOW TO USE THE CLASSES WHAT I MADE! Link to comment
karlis Posted April 24, 2010 Share Posted April 24, 2010 not bad, but its too small( i hope yet) to call it classes, add same for wantedlevel, gametime, etc. Link to comment
50p Posted April 24, 2010 Share Posted April 24, 2010 These are not classes in any way. I'd like to know what you mean by classes? Link to comment
Taalasmaa Posted April 24, 2010 Author Share Posted April 24, 2010 These are not classes in any way. I'd like to know what you mean by classes? Well not classes, but libraries.. These makes yhe Data storing much easier for newbies Link to comment
darkdreamingdan Posted April 25, 2010 Share Posted April 25, 2010 So it's basically an automated storage system for GTASA Player data, such as their weapons, clothes, money etc? I think making that more clear in the topic would be handy. Link to comment
Taalasmaa Posted April 25, 2010 Author Share Posted April 25, 2010 So it's basically an automated storage system for GTASA Player data, such as their weapons, clothes, money etc?I think making that more clear in the topic would be handy. Yes, that's right. And it will be much more easier for newbies. Link to comment
Jason_Gregory Posted April 25, 2010 Share Posted April 25, 2010 I think its easy for beginners but i can´t see any Classes Where you want to store your Data ? Into a SQL Database, MySQL, Stylesheets (xml), Accountstylesheet (Account.xml) or in .txt´s ? Link to comment
Taalasmaa Posted April 25, 2010 Author Share Posted April 25, 2010 I think its easy for beginners but i can´t see any Classes Where you want to store your Data ? Into a SQL Database, MySQL, Stylesheets (xml), Accountstylesheet (Account.xml) or in .txt´s ? Of course you dont see.. Resource is WIP and classes will be released in release version. The datas will be stored to mta accounts. Link to comment
Jason_Gregory Posted April 25, 2010 Share Posted April 25, 2010 I think its easy for beginners but i can´t see any Classes Where you want to store your Data ? Into a SQL Database, MySQL, Stylesheets (xml), Accountstylesheet (Account.xml) or in .txt´s ? Of course you dont see.. Resource is WIP and classes will be released in release version. The datas will be stored to mta accounts. Mhm..maybe you should swap to SQL or MySQL. It´s working much faster than storing everything in a Stylesheet and the Mta Server wont lose CPU for storing/requesting data indeed Good luck mate Link to comment
Taalasmaa Posted April 25, 2010 Author Share Posted April 25, 2010 I think its easy for beginners but i can´t see any Classes Where you want to store your Data ? Into a SQL Database, MySQL, Stylesheets (xml), Accountstylesheet (Account.xml) or in .txt´s ? Of course you dont see.. Resource is WIP and classes will be released in release version. The datas will be stored to mta accounts. Mhm..maybe you should swap to SQL or MySQL. It´s working much faster than storing everything in a Stylesheet and the Mta Server wont lose CPU for storing/requesting data indeed Good luck mate Thank you, but I have no idea how SQL works I'm pro in storing the datas to mta accounts, but i've never learned SQL. Link to comment
DakiLLa Posted April 25, 2010 Share Posted April 25, 2010 Thank you, but I have no idea how SQL works I'm pro in storing the datas to mta accounts, but i've never learned SQL. I was having same problem. Once upon a time all accounts on my server were suddenly deleted so i decided to implement a new account data system. May be SQL seems hard on the first view, but I have explored out all basic queryes over one night. Well, you can try to play with querys, its pretty much flexible than XML (imo) Link to comment
Xierra Posted April 25, 2010 Share Posted April 25, 2010 Nice one! That could be good if I want to store my weapon skill, money, stats, etc. I hope you release one! (as before I haven't seen the topic ) Link to comment
Orange Posted April 25, 2010 Share Posted April 25, 2010 Bueh... It's nothing with openframe's account classes local Acc = of.account:fromName("Example") Acc.data.money = 12333 -- amount of money, example Someone can make a class which makes it automatically... I must write these classes fast and make a tutorial Link to comment
darkdreamingdan Posted April 25, 2010 Share Posted April 25, 2010 Bueh... It's nothing with openframe's account classes local Acc = of.account:fromName("Example") Acc.data.money = 12333 -- amount of money, example Someone can make a class which makes it automatically... I must write these classes fast and make a tutorial You're missing the point. Link to comment
Orange Posted April 26, 2010 Share Posted April 26, 2010 I'm always missing the point You can make a normal class or make exported functions... Then it can be like: local AccountLib = exports.account_libraries ... AccountLib:BlahBlahMethod() ... or something like it... It will be a lot easier to use Link to comment
1B0Y Posted May 15, 2010 Share Posted May 15, 2010 not bad, should give it a try when im stuck on something 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