26.04.2016, 14:42
Quote:
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();. |
But what if I need to do something when seconds gone? I think its not good to create 1 more timer, if I have already 1 global timer, where I can do this.