31.10.2013, 22:52
Hi guys.
I've got a bit of a problem with a Timer. I need the timer to be seperate for each player. So I have:
I set the timer to nothing when the player connects.
I then call the timer whenever I need to:
At the end of the timer function, I kill it:
I also kill the timer when the player disconnects.
I first call the timer when the player connects, as I have a welcome screen. In the timer function, I hide the welcome screen and spawn the player. How ever, the problem is that the player has to disconnect and re-connect before the timer function will actually work. So the player connects for the first time, and the timer gets called but the function doesn't work, the player then disconnects and re-connects and the function decides to work.
Any ideas?
I've got a bit of a problem with a Timer. I need the timer to be seperate for each player. So I have:
pawn Код:
new WelcomeTimer[MAX_PLAYERS];
pawn Код:
WelcomeTimer[playerid] = 0;
pawn Код:
WelcomeTimer[playerid] = SetTimerEx(...);
pawn Код:
KillTimer(WelcomeTimer[playerid]);
I first call the timer when the player connects, as I have a welcome screen. In the timer function, I hide the welcome screen and spawn the player. How ever, the problem is that the player has to disconnect and re-connect before the timer function will actually work. So the player connects for the first time, and the timer gets called but the function doesn't work, the player then disconnects and re-connects and the function decides to work.
Any ideas?