28.01.2014, 20:05
So, when any player connected dialogs don't show.
This is my OnPlayerConnect:
I use MySQL plugin R6
This is my OnPlayerConnect:
pawn Код:
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");
}