Question about timers opitimization
#7

Quote:
Originally Posted by introzen
Посмотреть сообщение
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();.
Thanks.
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.
Reply


Messages In This Thread
Question about timers opitimization - by BloodyRP - 25.04.2016, 19:33
Re: Question about timers opitimization - by Jefff - 25.04.2016, 23:14
Re: Question about timers opitimization - by BloodyRP - 26.04.2016, 06:56
Re: Question about timers opitimization - by introzen - 26.04.2016, 07:26
Re: Question about timers opitimization - by BloodyRP - 26.04.2016, 07:46
Re: Question about timers opitimization - by introzen - 26.04.2016, 08:06
Re: Question about timers opitimization - by BloodyRP - 26.04.2016, 14:42
Re: Question about timers opitimization - by Gammix - 26.04.2016, 14:48
Re: Question about timers opitimization - by BloodyRP - 26.04.2016, 14:58
Re: Question about timers opitimization - by CalvinC - 26.04.2016, 15:04

Forum Jump:


Users browsing this thread: 1 Guest(s)