if(dialogid == DIALOG_LOGIN)
{
if(!response)
{
new str1[256];
format(str1, 150, "{FFFFFF}This name is registered,enter a password for this account:\n");
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, ""COL_GREEN"FR - Login", str1, "Login", "");
}
if(response)
{
if(udb_hash(inputtext) != PlayerInfo[playerid][pPass])
{
new name[MAX_PLAYER_NAME];
new string[50];
counts++;
GetPlayerName(playerid, name, sizeof(string));
format(string, sizeof(string),"%s_tmp%d",name,counts);
PlayerInfo[playerid][pLogged] = -1;
SetPlayerName(playerid, string);
}
else
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
SendClientMessage(playerid, COLOR_RED, "You have logged in your account");
PlayerInfo[playerid][pLogged] = 1;
loggedcash[playerid] = 1;
}
}
}
|
Fancy,you know what response mean?
If he press close,why will you show it again? That will make him enable to /q ... So that is the problem,make it: if(!response) { Kick(playerid) } |