PDA

View Full Version : Register / login


BuggedPlayer
28/01/2014, 08:05 PM
So, when any player connected dialogs don't show.

This is my OnPlayerConnect:

new Query[80];
new pName[24];
new string[164];
GetPlayerName(playerid, pName, 24);
format(Query, sizeof(Query), "SELECT `Username` from `conturi` WHERE `Username` = '%s' LIMIT1", pName);
mysql_query(Query);
mysql_store_result();
if(mysql_num_rows() == 1)
{
format(string, sizeof(string), "Welcome back, %s!\nPlease enter your password to login in!", pName);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", string, "Login", "Cancel");
}
if(mysql_num_rows() == 0)
{
format(string, sizeof(string), "Welcome to the server, %s!\nPlease enter your paassword to register!", pName);
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", string, "Register", "Cancel");
}


I use MySQL plugin R6

BuggedPlayer
28/01/2014, 08:10 PM
I don't have any errors

Brandon_More
28/01/2014, 08:14 PM
MySQL_Debug.txt?

BuggedPlayer
28/01/2014, 08:15 PM
I don't have this.
Now even if the account dosen't exist the server show dialog login!

BuggedPlayer
28/01/2014, 08:30 PM
bump

BuggedPlayer
29/01/2014, 08:11 AM
bump