What is the easiest way to coding a smooth count down? For example, player connects to server it says "server loading in 10 seconds" and it count backwards. (Usage of either GameTextForPlayer or TextDrawSetString)
I have tried coding it using SetTimerEx but it isn't smooth nor doing exactly what I want it to do. Any help would be appreciated.
That is not what I am trying to exactly do. There is a textdraw interface with rules etc. I want to show for 10 seconds or more before it goes to the login or register dialogs. I just want something saying X amount of time before whatever.
EDIT:
Alright, Thank you for your code. I will try to learn from it.
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
Edited my post - check again please.
Posts: 4,885
Threads: 57
Joined: Jun 2012
Reputation:
0
MP2 you forgot something, you need to kill the timer when a player disconnects so a player connecting quickly doesn't get stuck with a repeating ghost timer you could also put KillTimer() in the countdown start stock which is probably easier.
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
It wasn't really a proper example, it's a server-wide countdown, not player-specific. For that you'll need SetTimerEx and an array for the timer ID/seconds.