23.08.2013, 13:54
I'm making a custom class selection. Server should spawn me after I click a textdraw. But it sends me back to class selection.
pawn Code:
else if(playertextid == tID[playerid][9])
{
ClearTD(playerid); //removes all textdraws
CancelSelectTextDraw(playerid);
TogglePlayerSpectating(playerid,0); //I set it to 1 under OnPlayerConnect and setting it back to 0 after they've done choosing a skin.
SetPlayerSkin(playerid, (Player[playerid][Team] == CTerror) ? 285 : 28); //Sets player's skin
Player[playerid][Skin] = GetPlayerSkin(playerid);
SpawnPlayer(playerid); //Spawns them
SetCameraBehindPlayer(playerid);
}