Tach Community,
Bei mir hat sich ein kleiner Bug aufgetan
Ich kann jedes Passwort eingeben, und werde immer gespawnt:
if(response)
{
if(strlen(inputtext) == 0)
{
ShowPlayerDialog(playerid,D_LOGIN,DIALOG_STYLE_PASSWORD,STAG"-Login","FEHLER: PASSWORT EINGEBEN !","Login","Abbrechen"); //... zeigen wir ihm den Dialog
}
else
{
if(!strcmp(inputtext, mysql_ReturnPasswort(SpielerName(playerid)), true))
{
SetPVarInt(playerid,"logged",1);
LoadPlayer(playerid);
SetSpawnInfo(playerid,0,0,738.0281, -27.2121, 1000.5790,0,0,0,0,0,0,0);
SpawnPlayer(playerid);
return 1;
}
else
{
logincount[playerid]++;
if(logincount[playerid] == 3)
{
KickU(playerid,"Falsches Passwort!");
}
else
{
new str[50];
format(str,50,"FEHLER: Falsches Passwort!!\nVersuch: %d/3",logincount);
ShowPlayerDialog(playerid,D_LOGIN,DIALOG_STYLE_PASSWORD,STAG"-Login",str,"Login","Abbrechen");
}
return 1;
}
}
}
else KickU(playerid,"Abbruch");
stock mysql_ReturnPasswort(Name[])
{
new query[130],get[130];
mysql_real_escape_string(Name,Name);
format(query,sizeof(query),"SELECT `Passwort` FROM `accounts` WHERE = '%s'",Name);
mysql_query(query);
mysql_store_result();
mysql_fetch_row(get); /
mysql_free_result();
return get;
}