AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   What is the best way to save player stats? (https://forums.alliedmods.net/showthread.php?t=117137)

V I R U S 01-29-2010 13:57

What is the best way to save player stats?
 
Hi AMXX coders!

I'm trying to make own plugin to save player stats im MySQL database.


What I'm currently curious about, is the way to get the stats, no, better to save how to save them for a current map.

I've found two ways.
1. get_user_stats - is the first way, but by calling it, it retrieves not only the stats for the current map, but overall stat if player has played before.

2. get_user_rstats - retrieves the stats for each round, must be saved globally and added new each round.


For the first one, i really don't know, is it possible to get the stats only for the current map?

For the second, if i will define global variable like g_cache[MAX_PLAYERS][FILEDS_NUMBER] will my server get laggy?


Thanks for all answers!


All times are GMT -4. The time now is 07:24.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.