SamHII Posted July 5, 2010 Posted July 5, 2010 Well we got the basemode rhbk made (thanks!) but would like to add a stats system. I've had a look in the resources but nothing really suits. Looking for something that saves how many kills and deaths you have, much like the KDR at the top of the basemode screen but saved for next time. Anyone know of something like this? Or how we could make one? Thanks -Sam
Orange Posted July 5, 2010 Posted July 5, 2010 I already made one for xHoTx BaseMode server. It detects when you register and creates a row into SQLite database. Then, when you kill someone it adds you 1 kill point using executeSQLUpdate. To show it, it simply executes query "SELECT * FROM blahtable ORDER BY kills / deaths LIMIT 10", and shows TOP10 on the list sorted by ratio.
SamHII Posted July 6, 2010 Author Posted July 6, 2010 Is there anyway we can do it on a home sever? Thanks.
SamHII Posted July 7, 2010 Author Posted July 7, 2010 I already made one for xHoTx BaseMode server. Can I have it please?
Orange Posted July 7, 2010 Posted July 7, 2010 When I make a script FOR a specified server, I usually don't share it to others
Castillo Posted July 7, 2010 Posted July 7, 2010 When I make a script FOR a specified server, I usually don't share it to others ok i have a question, if u dont share it why u say u made it?. in my opinion is kinda useless
SDK Posted July 7, 2010 Posted July 7, 2010 When I make a script FOR a specified server, I usually don't share it to others ok i have a question, if u dont share it why u say u made it?. in my opinion is kinda useless He explained roughly how he did it tho. In my opinion that's usefull It detects when you register and creates a row into SQLite database. Then, when you kill someone it adds you 1 kill point using executeSQLUpdate. To show it, it simply executes query "SELECT * FROM blahtable ORDER BY kills / deaths LIMIT 10", and shows TOP10 on the list sorted by ratio.
Castillo Posted July 7, 2010 Posted July 7, 2010 When I make a script FOR a specified server, I usually don't share it to others ok i have a question, if u dont share it why u say u made it?. in my opinion is kinda useless He explained roughly how he did it tho. In my opinion that's usefull It detects when you register and creates a row into SQLite database. Then, when you kill someone it adds you 1 kill point using executeSQLUpdate. To show it, it simply executes query "SELECT * FROM blahtable ORDER BY kills / deaths LIMIT 10", and shows TOP10 on the list sorted by ratio. Yes but the guy who asked for it i think dosnt know anything about scripts.
SamHII Posted July 8, 2010 Author Posted July 8, 2010 Yes but the guy who asked for it i think dosnt know anything about scripts. Yeah, that's true. But notice I say "we", I'm not the only one involved in this server. I just make maps and do the textures and stuff. Any help IS appreciated thanks.
Gamesnert Posted July 9, 2010 Posted July 9, 2010 Scripts are unlikely to be made for free. If they're made and for public use, they're on the community website. If they aren't on there, you'll have to either make your own or try to convince someone of making it for you, which is much less likely to succeed. Also, if there are multiple people involved, it sounds to me like there is someone in the team with more scripting knowledge than you. Why wouldn't you simply let him look at Orange's post and respond to it?
darkraid Posted July 9, 2010 Posted July 9, 2010 I'm that other person that Sam is talking about. I have no experience with mySQL. I also have minor knowledge with scripting. So what orange is talking about doesn't mean anything to me but I will try and use the information that has been given (thanks!) to try and make what we would like. Thanks.
Orange Posted July 9, 2010 Posted July 9, 2010 Thanks guys ;P I don't use MySQL. I just use SQLite database implented into MTA to store data such as kills and deaths. You can simply use functions like: --SQLite executeSQLCreateTable() executeSQLSelect() executeSQLUpdate() executeSQLQuery() -- for advanced queries executeSQLInsert() --GUI guiCreateWindow() guiCreateGridlist() etc. Also, I made it in my framework, OpenFrame
darkraid Posted July 10, 2010 Posted July 10, 2010 Hmmm. Is there a tutorial that you recommend so that I can learn the knowledge I need to create a stats system. Also I have downloaded SQLite but I don't understand what you are suppose to do with it?
darkraid Posted July 11, 2010 Posted July 11, 2010 Jeeze I'm making such a fool of myself. So you just use those codes above in a lua script?
MaddDogg Posted July 11, 2010 Posted July 11, 2010 Yes, here are again the functions: https://wiki.multitheftauto.com/wiki/Ser ... _functions
darkraid Posted July 11, 2010 Posted July 11, 2010 Yes, here are again the functions: https://wiki.multitheftauto.com/wiki/Ser ... _functions Already got that bookmarked but thanks.
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