12.04.2011, 13:54
I have this code to skip class selection:
But then after the first time I die, it shows me the class selection screen even though I never pressed F4. Also, it only does it after the first death, because later it doesn't show me class selection after dying.
So how can I fix it so that it doesn't show me that class selection after I die UNLESS i press F4? (i don't want it to totally remove class selection.. only when the player connects or dies without pressing F4)
pawn Код:
new SkinSkipTimer[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
KillTimer(SkinSkipTimer[playerid]);
SkinSkipTimer[playerid] = SetTimerEx("SkipClass", 100, 0, "i", playerid);
}
forward SkipClass(playerid);
public SkipClass(playerid)
{
SetSpawnInfo(playerid, 0, Skin[playerid], 1959.8774, 1343.1293, 16.0, 270.0, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
KillTimer(SkinSkipTimer[playerid]);
}
So how can I fix it so that it doesn't show me that class selection after I die UNLESS i press F4? (i don't want it to totally remove class selection.. only when the player connects or dies without pressing F4)