26.04.2016, 08:06
Save the unix-time when player enters the server and save it when he disconnects. Then calculate how many seconds were played and add to a total variable which you store in INI or SQL.
You can use a timer for this.
More efficient though would be to set the actual timer for as long as the player needs to be muted, and then create a player command which a player can use you check how much is left of their mute, you then have to store the time in an array as above with gettime();.
You can use a timer for this.
More efficient though would be to set the actual timer for as long as the player needs to be muted, and then create a player command which a player can use you check how much is left of their mute, you then have to store the time in an array as above with gettime();.