Class selection skipping problem
#1

I have this code to skip class selection:
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]);
}
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)
Reply
#2

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
        SpawnPlayer(playerid);
    return 1;
}
This should help cause if you say when you die you go to class selection, this should spawn you anyways..
Reply
#3

Quote:
Originally Posted by Seven_of_Nine
Посмотреть сообщение
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
        SpawnPlayer(playerid);
    return 1;
}
This should help cause if you say when you die you go to class selection, this should spawn you anyways..
But what if the player pressed F4 before death? Then he also wouldn't be able to go to class selection... But that's not what I want.

// EDIT:

NVM lol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)