if(mysql_num_rows() > 0) //If the user is found { PlayerInfo[playerid][pRegistered] = 1; PlayerInfo[playerid][pLogged] = 0; if (PlayerInfo[playerid][pRegistered] == 0 && PlayerInfo[playerid][pLogged] == 0) { format(string, sizeof(string), "Cops And Robbers\n \nNew Registration - Name: %s\n \nDo Not Register Multiple Accounts\nDo Not Use The Same Password That You Use Elsewhere\nMinimum 6 Chars Maximum 12 Chars\n \nPlease Enter A Password For Your Account:",PlayerInfo[playerid][pName],playerid); ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT , "CnR Registration",string, "Register", "Cancel"); } // thats the problem if (PlayerInfo[playerid][pRegistered] == 1 && PlayerInfo[playerid][pLogged] == 0) { format(string, sizeof(string), "CnR\n \nThis name, %s, is Rgistered.\nIf this is not your account, please quit and change your name.\n \nPlease Enter Your Password To Login:",PlayerInfo[playerid][pName],playerid); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT , "Login", string, "Login", "Cancel"); } //this one works fine
if(mysql_num_rows() > 0) //If the user is found
{
PlayerInfo[playerid][pRegistered] = 1;
PlayerInfo[playerid][pLogged] = 0;
}
if (PlayerInfo[playerid][pRegistered] == 0 && PlayerInfo[playerid][pLogged] == 0)
{
format(string, sizeof(string), "Cops And Robbers\n \nNew Registration - Name: %s\n \nDo Not Register Multiple Accounts\nDo Not Use The Same Password That You Use Elsewhere\nMinimum 6 Chars Maximum 12 Chars\n \nPlease Enter A Password For Your Account:",PlayerInfo[playerid][pName],playerid);
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT , "CnR Registration",string, "Register", "Cancel");
}
if (PlayerInfo[playerid][pRegistered] == 1 && PlayerInfo[playerid][pLogged] == 0)
{
format(string, sizeof(string), "CnR\n \nThis name, %s, is Rgistered.\nIf this is not your account, please quit and change your name.\n \nPlease Enter Your Password To Login:",PlayerInfo[playerid][pName],playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT , "Login", string, "Login", "Cancel");
}
pawn Код:
|
// reseting variables
PlayerInfo[playerid][pRegistered] = 0;
PlayerInfo[playerid][pLogged] = 0;
if(mysql_num_rows() > 0) //If the user is found
{
PlayerInfo[playerid][pRegistered] = 1;
format(string, sizeof(string), "CnR\n \nThis name, %s, is Rgistered.\nIf this is not your account, please quit and change your name.\n \nPlease Enter Your Password To Login:",PlayerInfo[playerid][pName],playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT , "Login", string, "Login", "Cancel");
//this one works fine
}
else // account doesn't exist so we call register dialog
{
format(string, sizeof(string), "Cops And Robbers\n \nNew Registration - Name: %s\n \nDo Not Register Multiple Accounts\nDo Not Use The Same Password That You Use Elsewhere\nMinimum 6 Chars Maximum 12 Chars\n \nPlease Enter A Password For Your Account:",PlayerInfo[playerid][pName],playerid);
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT , "CnR Registration",string, "Register", "Cancel");
// thats the problem
pawn Код:
|