open.mp forum
[Pawn] Help! How hidden the skin select button when the player will spawn ? - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] Help! How hidden the skin select button when the player will spawn ? (/showthread.php?tid=1897)



Help! How hidden the skin select button when the player will spawn ? - PutuSuhartawan - 2021-04-18

i have problem with this function



Code:
public OnPlayerRequestSpawn(playerid)

{

if(IsPlayerNPC(playerid)) return 1;

? SEM(playerid, "OnPlayerRequestSpawn");



if(!IsPlayerNPC(playerid))

{

? ? TogglePlayerSpectating(playerid, 1);

//return cmd_spawn(playerid);

SendClientMessage(playerid, -1, "You are detect was not an NPC sir");

if(!PLAYER_STATE_SPAWNED)

{

SpawnPlayer(playerid);

return cmd_rumahsakit(playerid);

}

return cmd_rumahsakit(playerid);

}



}







Code:
public OnPlayerRequestClass(playerid, classid)

{

? StatusBaruLogin[playerid] = 1;

if(IsPlayerNPC(playerid)) return 1;

? TogglePlayerSpectating(playerid, 1);

? SpawnPlayer(playerid);

? /*

? SetSpawnInfo(0, 0, 0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0);

? SetPlayerCameraPos(playerid, Float:1494.7446, Float:-2293.4832, Float:18.2991);

? SetPlayerCameraLookAt(playerid, Float:1494.7446, Float:-3763.4832, Float:12.29911557, CAMERA_MOVE);

? */

?

?

? cmd_rumahsakit(playerid);

? SEM(playerid, "OnPlayerRequestClass");

if(!PLAYER_STATE_SPAWNED)

{



? ?

SpawnPlayer(playerid);

return 1;

}







How to remove select player class or skin system on player will spawn?


RE: Help! How hidden the skin select button when the player will spawn ? - Behemoth - 2021-04-21

You can use this when a player connects



Code:
    TogglePlayerSpectating(playerid, true);

    TogglePlayerSpectating(playerid, false);



It basically removes it to how I think you intend?