2021-04-18, 04:52 AM
i have problem with this function
How to remove select player class or skin system on player will spawn?
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?