Saving timer when player logs off ?
#10

Quote:
Originally Posted by Black Axe
Посмотреть сообщение
Indeed , I just wanna know how would something like that work.
You would need to save a value called time left in the player's file. Then, as soon as the player connects, you would use a timer (which, as previously demonstrated would "tick" every second) and it would cause the value of that value to go down by one. OnPlayerDisconnect, you would save the player's time left like any other stat. If you want the timer to reset after 10 minutes, inside of the timer you would check if the player's time left was equal to zero, and then set their time left back to 10 minutes.

What I've explained above is pretty simple, but if you still need help I can post the code for you.
Reply


Messages In This Thread
Saving timer when player logs off ? - by Black Axe - 28.04.2013, 11:51
Re: Saving timer when player logs off ? - by LetsOWN[PL] - 28.04.2013, 11:56
Re: Saving timer when player logs off ? - by Black Axe - 28.04.2013, 12:06
Re: Saving timer when player logs off ? - by LetsOWN[PL] - 28.04.2013, 12:20
Re: Saving timer when player logs off ? - by Tamer - 28.04.2013, 12:20
Re: Saving timer when player logs off ? - by LetsOWN[PL] - 28.04.2013, 12:29
Re: Saving timer when player logs off ? - by Black Axe - 28.04.2013, 12:31
Re: Saving timer when player logs off ? - by Tamer - 28.04.2013, 12:32
Re: Saving timer when player logs off ? - by LetsOWN[PL] - 28.04.2013, 12:35
Re: Saving timer when player logs off ? - by RVRP - 28.04.2013, 12:36

Forum Jump:


Users browsing this thread: 4 Guest(s)