Код:
public OnPlayerRequestClass(playerid, classid)
{
if(gPlayerLogged[playerid] == 0 && !IsPlayerNPC(playerid))
{
PlayerPlaySound(playerid, 1097,-119.9460,23.1096,12.2238);
TogglePlayerSpectating(playerid,1);
SendClientMessage(playerid,TEAM_CYAN_COLOR,"____________________________________________________");
SendClientMessage(playerid,TEAM_CYAN_COLOR," Welcome To ***** Roleplay ! ");
if(gPlayerAccount[playerid] == 1)
{
ShowPlayerDialog(playerid,100,DIALOG_STYLE_INPUT,"Login..","That name is registered, Please enter your password to login.","Login","Quit");
}
else
{
ShowPlayerDialog(playerid,101,DIALOG_STYLE_INPUT,"Register..","That name isn't registered, please enter your password to continue.","Register","Quit");
}
SendClientMessage(playerid,TEAM_CYAN_COLOR,"____________________________________________________");
SetTimerEx("FixCamera", 1, false, "i", playerid);
}
else if(gPlayerLogged[playerid] == 1 && UsingSkin[playerid] == 0 && !IsPlayerNPC(playerid))
{
SpawnPlayer(playerid);
}
else if(gPlayerLogged[playerid] == 1 && UsingSkin[playerid] == 1 && !IsPlayerNPC(playerid))
{
PlayerPlaySound(playerid, 1187,-119.9460,23.1096,12.2238);
DOO_SetPlayerPos(playerid,1679.3274,1447.8716,47.7780);
SetPlayerFacingAngle(playerid,273.2993);
SetPlayerCameraPos(playerid, 1890.1014,-1194.7969,25.8091);
SetPlayerCameraLookAt(playerid, 1933.4393,-1196.2479,18.8163);
}
return 1;
}