21.08.2012, 04:47
Hi guys.
I have a problem with a part of my script.
There's a part in my spawn check, at the very start, that if the check works out then a timer gets set off. This works to an extent. When the server first starts, if a new player connects they must first disconnect then re-connect for the timer to work, in saying that, when a new player connects the timer activates but doesn't call the function after the time.
Here's the codes for the timer:
The actual code to activate the timer:
And when a player connects:
I also kill the timer at the end of "WelcomeTimer".
I'm not sure why this is happening, it's a strange bug. As said above, it works perfectly after a player disconnects then re-connects, and a player has to do that every time the server starts.
I have a problem with a part of my script.
There's a part in my spawn check, at the very start, that if the check works out then a timer gets set off. This works to an extent. When the server first starts, if a new player connects they must first disconnect then re-connect for the timer to work, in saying that, when a new player connects the timer activates but doesn't call the function after the time.
Here's the codes for the timer:
pawn Код:
new WelcomeTimerEx[MAX_PLAYERS];
pawn Код:
WelcomeTimerEx[playerid] = SetTimerEx("WelcomeTimer", 2500, false, "i", playerid);
pawn Код:
WelcomeTimerEx[playerid] = 0;
I'm not sure why this is happening, it's a strange bug. As said above, it works perfectly after a player disconnects then re-connects, and a player has to do that every time the server starts.