case dIngreso:
{
if(response)
{
if(PassValida(playerid, inputtext) && (strlen(inputtext) > 0))
{
if(GetPVarInt(playerid,"ErraContraseсa") >= 2)
{
return Kick(playerid);
}
SetPVarInt(playerid,"ErraContraseсa", GetPVarInt(playerid,"ErraContraseсa")+1 );
new
string[210];
A_Format(string, ""#CBLANCO"La contraseсa introducida, no coincide con la contraseсa de "#CINFO"%s"#CBLANCO".\nSi erras tres veces la contraseсa, serбs expulsado automбticamente.\n\n\t\t\tIntento: "#CAMARILLO"[%d/3]", pName(playerid), GetPVarInt(playerid,"ErraContraseсa"));
Dialog(playerid, dIngreso, DIALOG_STYLE_INPUT, ""#CROJO"ЎContraseсa incorrecta!", string, "Aceptar", "Salir");
}
else
{
SetPVarInt(playerid,"Logueado",1);
LoadAccountData(playerid);
}
//****//
return 1;
}
else
return Kick(playerid);
}
CALLBACK: PassValida(playerid, cadena[])
{
new query[1024];
format(query, sizeof(query),"SELECT * FROM usuarios WHERE Nombre = '%s' AND Clave = md5('%s')",pName(playerid), cadena);
mysql_query(babiloniadb, query, true);
if(cache_get_row_count(babiloniadb) != 0)
{
return 1;
}
return 0;
}
SetPVarInt(playerid,"Logueado",1);
LoadAccountData(playerid);
I dont really understand it becuase i dont understand the language. Do you even check if the inputtext = equal to the players pw?
|