[FilterScript] [FS/PHP/MySQL]RStats - Detailed player stats for SA-MP
#1

RStats - Detailed player stats for SA-MP
ABOUT
RStats is a free project (SA-MP Filterscript and Web interface) for SA-MP which allows you to get detailled statistics from your players and keeps a history of it. With the well designed database of RStats you can extract a lot of information about players (time they spend each day on the server for example), use your imagination

Main features
  • Detailled players stats (connects, disonnects, spawns, vehicle usage, kills, deaths, etc.).
  • Well designed database.
  • Player stat dialog box.
  • Random stats messages.
  • Awesome web interface coming soon !
Information
I'm currently working on a V2 (complete rewrite), please don't use this version, it's old and unsecure.
The web interface is still in developement, but you can use the filterscript and collect stats to use for the coming panel.
Important : It's just a stats filterscript and not a register/login one ! The accounts are not protected, use another system for that.

Author
This project was developped by Rafael 'R@f' Keramidas <rafael [AT] keramid [DOT] as>.

Donations
If you like this project or make a commercial use for it, please donate via paypal at rafael.keramidas [AT] gmail [DOT] com. Of course you don't have to but it would be nice if you do

Credits/Thanks
BlueG : For his MySQL Plugin.

LICENCE
This project is released under GPLv3. Read the GPLv3.txt for more information.

DOWNLOAD
You can get the project on Github : http://roflc.at/8z

How to download the zip archive ?
Take a look at this screenshot : http://rafael.keramid.as/rpanel/howtodl.png

REQUIRED (SA-MP) REQUIRED (Web Server)
  • Coming
INSTALL (SA-MP)
1. Create the tables using the SQL Code located in the "SQL" folder.
2. Get the Filterscript located in the "Filterscript" folder and place it where you want.
3. Change the MySQL Credentials and ajust the settings like you want and compile it.
4. Use it !

INSTALL (Web)
Coming

COMMANDS (SA-MP)
/mystats : Shows your own stats.
/stats [playerid] : Shows the stats of a given player ID.

SCREENSHOT
SA-MP
http://i.imgur.com/KIBDL.jpg

Web
None

DATABASE
A view on the MySQL Database design :


SUPPORT
I don't give ANY support for the installation or usage of this script, so please don't contact me for that !!
If you found a bug, write me at rafael [AT] keramid [DOT] as and don't forget to put "RStats" in the subject.

CHANGELOG
V1.0 - 13th September 2012
  • Initial release of the Filterscript.
TODO
V1.1
  • (SA-MP) Add date related stats (date with the most timeouts for example).
  • (Web) Release the web interface


Enjoy
Reply
#2

Very nice good job man!
Reply
#3

nice
Reply
#4

Very Nice!
Reply
#5

playerid under rstats_chatmessage?
why not the name?
Reply
#6

Quote:
Originally Posted by Ricop522
Посмотреть сообщение
playerid under rstats_chatmessage?
why not the name?
Playerid (foreign key) is used in every other table because it's a normalized database (http://en.wikipedia.org/wiki/Database_normalization). If you want to get the username and the message in the same query you have to do a SQL Join, like this (didn't tried it). :
Код:
SELECT u.username AS username, c.chatmsg AS message FROM rstats_chatmessages INNER JOIN rstats_users u ON u.userid = c.playerid WHERE u.username = 1;
---

Thanks for the comments.
Reply
#7

Grab em home server?
Because it's always in FilterScript bug. -.
Reply
#8

Very nice can you put a sample picture of web
Reply
#9

That's realy nice. Forsure i will use it
Reply
#10

Another nice project
Reply
#11

Nice and usefull for RPG servers.. Good Work
Reply
#12

Can you do an ftp version for people with non mysql scripts
Reply
#13

Looks pretty nice, but I spotted some rather nasty mistakes.

Код:
// OnPlayerText
format(sMysqlQuery, sizeof(sMysqlQuery), "INSERT INTO rstats_chatmessages VALUES(null, %d, '%s', NOW())", iUserid[playerid], text);
mysql_query(sMysqlQuery);
Код:
// OnPlayerCommandText
format(sMysqlQuery, sizeof(sMysqlQuery), "INSERT INTO rstats_commands VALUES(null, %d, '%s', NOW())", iUserid[playerid], cmdtext);
mysql_query(sMysqlQuery);
The user input is not escaped, which means if someone says for instance "It's a pencil", the query will fail. (because of the apostrophe).

However, not all people are nice, and someone might say
Код:
'); DROP TABLE `rstats_users`; /*
which would delete the whole table. Even if you do not allow the MySQL user to drop or truncate, someone could still ruin all your data with simple update queries. For instance
Код:
'); UPDATE `rstats_users` SET `score` = 0 WHERE 1; /*
would set everyone's score to 0.

Both queries would run just fine, but the database server would interpret that as multiple queries: INSERT INTO rstats_chatmessages VALUES(null, %d, ''); DROP TABLE `rstat_users`; /* , NOW())
The part after /* will be interpreted as comment and therefore omitted.

So I highly recommend you to escape all user input to prevent mysql injections.
Reply
#14

Now thats good xD
Reply
#15

Update download link, it dose not work!
Reply
#16

https://github.com/RafaelKeramidas/RStats

Here you go
Reply
#17

Quote:
Originally Posted by awsomedude
Посмотреть сообщение
Thanks mate.!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)