Taalasmaa Posted April 24, 2010 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
Taalasmaa Posted April 24, 2010 Author Posted April 24, 2010 These examples are no classes, lol No -.- But these examples are EXAMPLES HOW TO USE THE CLASSES WHAT I MADE!
karlis Posted April 24, 2010 Posted April 24, 2010 not bad, but its too small( i hope yet) to call it classes, add same for wantedlevel, gametime, etc.
50p Posted April 24, 2010 Posted April 24, 2010 These are not classes in any way. I'd like to know what you mean by classes?
Taalasmaa Posted April 24, 2010 Author 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
darkdreamingdan Posted April 25, 2010 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.
Taalasmaa Posted April 25, 2010 Author 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.
Jason_Gregory Posted April 25, 2010 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 ?
Taalasmaa Posted April 25, 2010 Author 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.
Jason_Gregory Posted April 25, 2010 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
Taalasmaa Posted April 25, 2010 Author 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.
DakiLLa Posted April 25, 2010 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)
Xierra Posted April 25, 2010 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 )
Orange Posted April 25, 2010 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
darkdreamingdan Posted April 25, 2010 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.
Orange Posted April 26, 2010 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
1B0Y Posted May 15, 2010 Posted May 15, 2010 not bad, should give it a try when im stuck on something
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