05.03.2011, 14:23
Player can log in and spawn without typing password in, whats the mistake:
if(dialogid == LOG)
{
if(response == 1)
{
new pass[256];
pass = dini_Get(file, "Password");
if(strcmp(inputtext, pass, true) == 0)
{
LoadPlayerData(playerid);
TogglePlayerSpectating(playerid,0);
SetPlayerColor(playerid,0xFFFFFFAA);
PlayerPlaySound(playerid,1186,0,0,0);
format(msg, sizeof(msg), "~w~welcome back~n~~p~%s", pname); GameTextForPlayer(playerid,msg,2000,0);
}
else
{
SendClientMessage(playerid, 0xFFFFFFAA, "{FFFF80}Wrong password.");
format(msg, sizeof(msg), "{80FFE8}Welcome back {80A2FF}%s{80FFE8}!\nInsert your password into the line below\nto log in to your account.", pname);
ShowPlayerDialog(playerid, LOG, DIALOG_STYLE_INPUT, " {8C80FF}Account Panel.", msg, "Login", "Cancel");
}
}
else
{
Kick(playerid);
}
}
if(dialogid == LOG)
{
if(response == 1)
{
new pass[256];
pass = dini_Get(file, "Password");
if(strcmp(inputtext, pass, true) == 0)
{
LoadPlayerData(playerid);
TogglePlayerSpectating(playerid,0);
SetPlayerColor(playerid,0xFFFFFFAA);
PlayerPlaySound(playerid,1186,0,0,0);
format(msg, sizeof(msg), "~w~welcome back~n~~p~%s", pname); GameTextForPlayer(playerid,msg,2000,0);
}
else
{
SendClientMessage(playerid, 0xFFFFFFAA, "{FFFF80}Wrong password.");
format(msg, sizeof(msg), "{80FFE8}Welcome back {80A2FF}%s{80FFE8}!\nInsert your password into the line below\nto log in to your account.", pname);
ShowPlayerDialog(playerid, LOG, DIALOG_STYLE_INPUT, " {8C80FF}Account Panel.", msg, "Login", "Cancel");
}
}
else
{
Kick(playerid);
}
}