TogglePlayerSpectating cause player kick.
#5

Well first off place.
pawn Code:
TogglePlayerSpectating(playerid, 1);
In the OnPlayerRequestClass public function, if you don't understand me:
pawn Code:
public OnPlayerRequestClass(playerid, classid)
{
    TogglePlayerSpectating(playerid, 1);
    if(PlayerInfo[playerid][Skin] == -1)
    {
        SetPlayerInterior(playerid, 0);
        SetPlayerPos(playerid, 249.8809, 1852.4695, 8.7625);
        SetPlayerCameraPos(playerid, 250.0132, 1849.3933, 8.7734);
        SetPlayerCameraLookAt(playerid, 249.8809, 1852.4695, 8.7625);
        SetPlayerFacingAngle(playerid, 177.0050);
    }
    else
    {
        SetSpawnInfo(playerid, 1, 0, 963.7003, -1616.3728, 14.7561, 180, 0, 0, 0, 0, 0, 0);
        SetPlayerSkin(playerid, PlayerInfo[playerid][Skin]);
        SpawnPlayer(playerid);
    }
    return 1;
}
And OnPlayerSpawn:
pawn Code:
public OnPlayerSpawn(playerid)
{
     TogglePlayerSpectating(playerid, 0);
}
Give it a shot, if not I'll think of another soloution.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)