10.03.2013, 13:41
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.
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?
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.
}
Maybe there is something that I am missing, but it looks like it should work properly.
Any ideas?