Hi, When I want to register the server and enter the password in the box to register my reappears as nothing happened.
Код:
public OnPlayerRegister(playerid, password[]) // v1.0 by Luk0r
{
if(IsPlayerConnected(playerid))
{
MySQLCheckConnection();
new playername3[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername3, sizeof(playername3));
new newaccountsqlid = MySQLCreateAccount(playername3, password, playerid);
if (newaccountsqlid != 0)
{
new loginstring[128];
PlayerInfo[playerid][pSQLID] = newaccountsqlid;
strmid(PlayerInfo[playerid][pKey], password, 0, strlen(password), 255);
OnPlayerUpdateEx(playerid);
format(loginstring,sizeof(loginstring),"Welcome, %s\nThats nickname is registered.\nPlease log-in",playername3);
ShowPlayerDialog(playerid,12346,DIALOG_STYLE_PASSWORD,"Login",loginstring,"Login","Exit");
return 1;
}
else
{
gPlayerAccount[playerid] = 0;
new regstring[256];
new regname[64];
GetPlayerName(playerid,regname,sizeof(regname));
format(regstring,sizeof(regstring),"{BECBFC}Welcome to the server, {95A3FF}%s{BECBFC}! \n\nPlease register an account by entering your desired password below.",regname);
ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Account Register",regstring,"Register","Exit");
}
}
return 0;
}