Hallo ,
ich habe ein Problem mit meinem Login - / Registersystem
man kann sich nämlich mit jedem Passwort einloggen ich weiss echt
nicht mehr weiter hier ist der Code:
if(dialogid == DIALOG_LOGIN)
{
if(response == 0)
{
return Kick(playerid);
}
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login - ","Welcome on the server.\nPlease enter your password.","Login","Leave");
return SendClientMessage(playerid,COLOR_RED,"The password is too short");
}
if(INI_Open(Save))
{
new Passwort[16];
INI_ReadString(Passwort,"Passwort",16);
if(strcmp(inputtext,Passwort,true) == 0)
{
PlayerInfo[playerid][pKills] = INI_ReadInt("Kills");
PlayerInfo[playerid][pDeaths] = INI_ReadInt("Deaths");
PlayerInfo[playerid][pAdminlevel] = INI_ReadInt("Adminlevel");
INI_Close();
switch(PlayerInfo[playerid][pAdminlevel])
{
case 1: {return SendClientMessage(playerid,COLOR_GREEN,"|SUP|: Logged in as Supporter!");}
case 2: {return SendClientMessage(playerid,COLOR_GREEN,"|MOD|: Logged in as Moderator!");}
case 3: {return SendClientMessage(playerid,COLOR_GREEN,"|ADM|: Logged in as Administrator!");}
}
PlayerInfo[playerid][plogged] = 1;
}
else
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login - ","Welcome on the server.\nPlease enter your password.","Login","Leave");
return SendClientMessage(playerid,COLOR_RED,"The password was wrong");
}
}
return 1;
}
ich hoffe ihr könnt mir helfen Pixel
//edit Problem gelöst