if(dialogid == 667)
{
if(response)
{
if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
gPlayerLogged[playerid] = 1;
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
SCM(playerid, COLOR_RED, "You have logged in. You may now spawn.");
}
else
{
gPlayer[playerid] += 1;
if(gPlayer[playerid] == 1)
{
SCM(playerid, COLOR_RED, "Wrong Password. 1/3");
}
if(gPlayer[playerid] == 2)
{
SCM(playerid, COLOR_RED, "Wrong Password. 2/3");
}
{
SCM(playerid, COLOR_RED, "Wrong Password. 3/3. You have been kicked.");
Kick(playerid);
}
}
}
}
}
return 1;
}
Go two questions !
(1) is there any other dialo I'd with the same ID that might be inturupting it ? (2) is the "Accept" buton on left ot right side ? (what I mean is to. Heck if it is "response") |
if(fexist(UserPath(playerid)))
{
if(gPlayerLogged[playerid] == 0){
ShowPlayerDialog(playerid, 667, DIALOG_STYLE_INPUT, "Login", "Type your password here.", "Submit", "Cancel");
}
if(dialogid == 667)
{
if(response)
{
if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
gPlayerLogged[playerid] = 1;
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
SCM(playerid, COLOR_RED, "You have logged in. You may now spawn.");
}
else
{
gPlayer[playerid] += 1;
if(gPlayer[playerid] == 1)
{
SCM(playerid, COLOR_RED, "Wrong Password. 1/3");
}
if(gPlayer[playerid] == 2)
{
SCM(playerid, COLOR_RED, "Wrong Password. 2/3");
}
else
{
SCM(playerid, COLOR_RED, "Wrong Password. 3/3. You have been kicked.");
Kick(playerid);
}
}
}
}
if(dialogid == 667)
{
if(response)
{
if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
gPlayerLogged[playerid] = 1;
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
SCM(playerid, COLOR_RED, "You have logged in. You may now spawn.");
}
else
{
gPlayer[playerid] += 1;
if(gPlayer[playerid] == 1)
{
SCM(playerid, COLOR_RED, "Wrong Password. 1/3");
}else if(gPlayer[playerid] == 2)
{
SCM(playerid ,COLOR_RED, "Wrong Password. 2/3");
}else if(gPlayer[playerid] == 3){
SCM(playerid, COLOR_RED, "Wrong Password. 3/3. You have been kicked.");
Kick(playerid);
}
}
}
}