11.05.2015, 01:31
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_LOGIN)
{
if(response == 0)
{
Kick(playerid);
}
else
{
new query[256], password[128];
format(query, sizeof(query), "SELECT `Password` FROM `accounts` WHERE id = %d", PlayerSQLID[playerid]);
mysql_query(query);
mysql_store_result();
mysql_fetch_row(password);
mysql_free_result();
new string[300];
format(string, sizeof(string), "Welcome to %s\n\nYou entered a wrong password, please try again:", HOSTNAME);
if(isnull(password))return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Please retry your password", string, "Login", "Leave");
if(strcmp(password, inputtext, false) == 0)
{
Thanks for any assistance.