11.07.2018, 18:43
If you enter the correct password you need to skip this lines from execute:
Something like this:
pawn Код:
ShowPlayerDialog(playerid, LoginDialog, DIALOG_STYLE_PASSWORD, "Trucking: {FFFF00}Login", "Welcome Back Trucking Veteran, Please login to continue:", "Login", "Leave");
SendClientMessage(playerid, COLOUR_RED, "Wrong Password");
pawn Код:
case LoginDialog:
{
if(!response) Kick(playerid);
new hashpass[129], query[100], playername[MAX_PLAYER_NAME], string[80];
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerIp(playerid, IP[playerid], 16);
WP_Hash(hashpass, sizeof(hashpass), inputtext);
if (!strcmp(IP[playerid], string, true))
{
mysql_format(Database, query, sizeof(query), "SELECT * FROM `accounts` WHERE `Name` = '%e' LIMIT 1", ReturnName(playerid));
mysql_tquery(Database, query, "OnAccountLoad", "i", playerid);
return 1;
}
else
if(!strcmp(hashpass, PlayerInfo[playerid][Password]))
{
mysql_format(Database, query, sizeof(query), "SELECT * FROM `accounts` WHERE `Name` = '%e' LIMIT 1", playername);
mysql_tquery(Database, query, "OnAccountLoad", "i", playerid);
return 1;
}
ShowPlayerDialog(playerid, LoginDialog, DIALOG_STYLE_PASSWORD, "Trucking: {FFFF00}Login", "Welcome Back Trucking Veteran, Please login to continue:", "Login", "Leave");
SendClientMessage(playerid, COLOUR_RED, "Wrong Password");
}