PDA

View Full Version : Login Problem


HighPitchedVoice
08/06/2012, 12:15 AM
Hello there,
Each time I press left or right on the team selection it comes up the login dialog again... EACH time I press left and right it does that.. Anyone know the solution?


public OnPlayerRequestClass(playerid, classid)
{

if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registration.",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
}
SetPlayerTeamFromClass(playerid, classid);
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
SetPlayerFacingAngle(playerid, 120.0);
SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
return 1;
}

Jonny5
08/06/2012, 12:20 AM
move this code into OnPlayerConnect


if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registration.",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
}

HighPitchedVoice
08/06/2012, 12:23 AM
Gracias :)