20.08.2011, 14:25
Even tho he's registered, when he connects it says to register again.
Why?
Why?
pawn Code:
public OnPlayerConnect(playerid)
{
new DBResult:qresult,string[200];
format(Query,sizeof(Query),"SELECT * FROM `Users` WHERE `Username` = '%s',",GetPName(playerid));
qresult = db_query(Users,Query);
if(db_num_rows(qresult))
{
format(string,sizeof(string),""lblue"Welcome back, "lyellow"%s"lblue"! \n"lwhite"Please enter your "lgreen"password"lwhite" to log in your account! \n",GetPName(playerid));
ShowPlayerDialog(playerid,Logindialog,1,""lwhite"Login",string,"Login","Kick");
}
else
{
format(string,sizeof(string),""lblue"Welcome "lyellow"%s"lblue"! \n"lwhite"Please enter your "lgreen"password"lwhite" to register your account! \n",GetPName(playerid));
ShowPlayerDialog(playerid,Registerdialog,1,""lwhite"Register",string,"Register","Kick");
}
return 1;
}