11.07.2018, 17:26
I have recent added Auto Login to my server. The dialog shows but i put the right password then it said wrong password and auto login me in.
Код:
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); } 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); } 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"); }