if(dialogid == DIALOG_LOGIN)
{
if(!response)
{
Kick(playerid);
return 1;
}
else if(response) // Pressed ENTER or clicked 'Login' button
{
if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
{
TextDrawHideForPlayer(playerid, TextdrawConectare0[playerid]);
TextDrawHideForPlayer(playerid, TextdrawConectare1[playerid]);
TextDrawHideForPlayer(playerid, TextdrawConectare2[playerid]);
TextDrawHideForPlayer(playerid, TextdrawConectare4[playerid]);
TextDrawHideForPlayer(playerid, TextdrawConectare16[playerid]);
TextDrawHideForPlayer(playerid, TextdrawConectare17[playerid]);
TextDrawHideForPlayer(playerid, TextdrawConectare18[playerid]);
TextDrawHideForPlayer(playerid, TextdrawConectare19[playerid]);
CancelSelectTextDraw(playerid);
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
PlayerLogged[playerid] = true;
SetTimerEx("TutorialDone", 100, false, "i", playerid);
SpawnPlayer(playerid);
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
LoadFightingStyle(playerid);
FadeColorForPlayer(playerid,0,0,0,255,0,0,0,0,15,0);
SCM(playerid, COLOR_WHITE, "You have successfully logged in.");
TogglePlayerSpectating(playerid, false);
PlayerLogged[playerid] = true;
SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
new playername[24];
GetPlayerName(playerid, playername, sizeof(playername));
PlayerInfo[playerid][pName] = playername;
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteString(File, "Name", PlayerInfo[playerid][pName]);
INI_Close(File);
sInfo[playerid][Misc] = 0;
sInfo[playerid][Head] = 0;
sInfo[playerid][Chest] = 0;
sInfo[playerid][Crotch] = 0;
sInfo[playerid][LArm] = 0;
sInfo[playerid][RArm] = 0;
sInfo[playerid][LLeg] = 0;
sInfo[playerid][RLeg] = 0;
//if(PlayerInfo[playerid][pTutorialDone] == 0) return SetTimerEx("AgeSetup", 1000, false, "i", playerid);
if(PlayerInfo[playerid][pBanned] == 1)
{
SCM(playerid, COLOR_LIGHTRED, "AdmCmd: You have been banned for logging into a banned account.");
SetTimerEx("UnsetBan", 500, 0, "i", playerid);
}
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","You have entered an incorrect password.\n""Type your password below to login.","Login","Quit");
}
return 1;
}
}
SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], 1713.6101,-1912.2190,13.5669,85.9081, 0, 0, 0, 0, 0, 0);
|
SetSpawnInfo
TogglePlayerSpectating
SpawnPlayer
SetCameraBehindPlayer
Use setspawninfo before calling SpawnPlayer, delete it from OnPlayerRequestClass, TogglePlayerSpectating right before player spawns, and then SetCameraBehindPlayer. It should look like this;
pawn Код:
|
Use setspawninfo before calling SpawnPlayer, delete it from OnPlayerRequestClass, TogglePlayerSpectating right before player spawns, and then SetCameraBehindPlayer. It should look like this;
pawn Код:
|
TogglePlayerSpectating(playerid, false); |
spawnplayer(); |