Official Soldat Forums
Server Talk => Scripting Discussions and Help => Topic started by: Ratman on March 19, 2017, 07:33:15 pm
-
Hello I am new to scripting and stuck at a spot.
I was wondering how I could keep track of the number of games or amount of time played by each player. The function or procedure would have to count every game/time while playing ctf no matter the team (except if hes specing) and the number would update at the end of each game (or continually if counting time).
I was thinking of using onplayerjoin but cant seem to find a way to keep tracking the time or games for each player.
Thank you!
-
I don't make scripts in Soldat but can't you use a cron-like solution that would fetch a list of players every e.g. 30 seconds?
-
I don't make scripts in Soldat but can't you use a cron-like solution that would fetch a list of players every e.g. 30 seconds?
Sorry I dont think I follow.. do you have any examples perhaps?
-
I don't make scripts in Soldat but can't you use a cron-like solution that would fetch a list of players every e.g. 30 seconds?
Sorry I dont think I follow.. do you have any examples perhaps?
Well, I'm sure it is possible to fetch a list of players at any time.
- Get a list of players currently playing
- Update the data stored in the database about time played by each player by increasing the value by 1 minute
- Reapeat every 1 minute
Cannot you do something like that?