( I made this for private use before )
Anywho.. There's 2 ways of doing this:
Method 1:
Use
get_user_time and store the Steam ID in a variable and save it upon disconnect. Check if the player has existing time already, if so, add that time to the existing entry.
Method 2:
In client_putinserver use set_task at 1 second intervals like so:
Code:
set_task(1.0, "update_time", id, _, _, "b");
Then make a global variable and increase it by 1 in the update_time function. You might want to check if the player hasn't joined a team yet and set mp_autokick to 1. Then do the same as the ending part of method 1.
__________________