02.10.2014, 22:18
I have this cod in OnPlayerConnect. Login dialog works fine when I enter with a registered username but register dialog doesnt appears if I get a new username. It directly show skin selector. How to fix that?
Код:
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