About timers.
#1

Hi i want to ask something. I have set a timer for 5 min and no repeat ( false ). But if i go from server, and that time ( 5 min ) will not pass, what will happen timer? do i need to kill him ?
Reply
#2

The timer will finish on the 5 minute mark and carry out the code you intended it to carry out. Whether or not the functions actually work depends on if the playerid is present in the server at the time, so if you leave and someone else joins with the same ID and the timer you started finishes, it will carry out the actions on him.

So yes, it's good practice to killer per-player timers when they disconnect from the server.
Reply
#3

Timers are not tied to players and will keep running regardless of what other functions you call (except KillTimer, ofcourse). Implementing an IsPlayerConnected check in the function that is to be called by the timer is probably the easiest solution.

Edit: Too late, and didn't think about another player connecting with same id.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)