Jump to content

Statistics System


SamHII

Recommended Posts

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

Link to comment

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.

Link to comment
When I make a script FOR a specified server, I usually don't share it to others :o

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.

Link to comment
When I make a script FOR a specified server, I usually don't share it to others :o

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.

Link to comment
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.

Link to comment

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?

Link to comment

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.

Link to comment

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 :P

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...