I want to save the full statistics for each match played on the server in a database, as a json that I can load and display on a web page later. (I can handle this part myself)
I want to track as much information as possible:
- basic stats like: kills, deaths , headshots etc
- individual weapon stats
Players come and go, so I also want to save the stats for the players that played only a few rounds and left. (players that were not online at the map change)
What is the best approach for doing this?
Can I detect when the map changes? Do I have time to do a POST request to my web server?
Should I keep all the statistics in a giant array?
How do other plugins do this? (hlstats, psychostats)