07.09.2013, 10:28
Ok thanks i'm using R6
Can anyone tell me how to fix this
i'm not registered but it show me the dialog login.
Can anyone tell me how to fix this
pawn Код:
public OnPlayerConnect(playerid)
{
new Query[80],string[128];
format(Query,sizeof(Query),"SELECT `Username` FROM `Users` WHERE `Username` = `%s` LIMIT 1;",GetName(playerid));
mysql_query(Query);
mysql_store_result();
if(mysql_num_rows() != 0)
{
format(string,sizeof(string),"Hey, %s! \nYour account is registered.\nPlease enter the password to log in!",GetName(playerid));
ShowPlayerDialog(playerid,0,DIALOG_STYLE_INPUT,"Login",string,"Login","Quit");
}
else
{
format(string,sizeof(string),"Hey, %s! \nYour account is not registered. \nPlease register to continue!",GetName(playerid));
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Register",string,"Register","Quit");
}
mysql_free_result();
return 1;
}