Jump to content

Statistics System


SamHII

Recommended Posts

Posted

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

BM-user.png
Posted

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.

http://zduniak.net - don't contact me regarding mta:sa

Posted
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

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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.

Learn Lua - Learn to script - GUI scripting

Scripter tools - Find/fix errors yourself(!)

Don't pm me for scripting help, keep it for the Scripting subforum!

Posted
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.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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.

BM-user.png
Posted

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?

Projects:

Slothbot | Maximap

Posted

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.

Posted

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

http://zduniak.net - don't contact me regarding mta:sa

Posted

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?

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...