Problem: Player respawning when a player requests class
#1

I've noticed that every time a player connects (and then immidietly calls OnPlayerRequestsClass), players are set back to spawn.

I have a code which skips the class selection, that might cause that but I doubt that.

pawn Code:
public OnPlayerRequestClass(playerid, classid)
{
    if(!gCharacterInfo[playerid][characterLoaded])
        gPlayerInfo[playerid][playerSkippedClassSelection] = 1;
    SetTimerEx("SkipPlayerClassSelection", 1, false, "d", playerid);
    return 1;
}
pawn Code:
Function:SkipPlayerClassSelection(playerid)
{
    SpawnPlayer(playerid);
    TogglePlayerControllable(playerid, 0);      // Make sure he can't move.
}
This callback, SkipPlayerClassSelection is actually beinng called for every player, when a player connects.

Maybe there is something that I am missing, but it looks like it should work properly.
Any ideas?
Reply


Messages In This Thread
Problem: Player respawning when a player requests class - by Maxips2 - 10.03.2013, 13:41
Re: Problem: Player respawning when a player requests class - by Threshold - 10.03.2013, 13:54
Re: Problem: Player respawning when a player requests class - by Maxips2 - 10.03.2013, 14:07

Forum Jump:


Users browsing this thread: 1 Guest(s)