A define ali se nгo me engano a senha do player serб trocada por aquilo..
PHP код:
enum pInfo
{
pSenha[128],
}
new PlayerInfo[MAX_PLAYERS][pInfo];
#define HASH_SENHA "AEOAUEABABEAEAEOUAEIX" // Coloque aqui oq serб trocado no lugar da senha..
if(dialogid == DIALOG_REGISTER)
{
if(!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Please enter a valid password!", "Please enter a valid registration password\nTo continue press Register\n\nOxiRegister 1.0\n", "Register", "Quit");
else
{
SHA256_PassHash(inputtext, HASH_SENHA, PlayerInfo[playerid][pSenha], 64);
GetPlayerIp(playerid, ip, sizeof(ip));
format(query, sizeof(query), "INSERT INTO `accounts` (`Username`, `Senha`, `IP`) VALUES ('%s', '%s', '%s')", GetName(playerid), PlayerInfo[playerid][pSenha], ip);
mysql_query(ConnectMYSQL,query);
pInfo[playerid][Registered] = true;
pInfo[playerid][LoggedIn] = true;
Logado[playerid] = 1;
tutorial[playerid] = -1;
SetPlayerHealthEx(playerid, 100);
pInfo[playerid][UserID] = cache_get_field_content_int(0, "UserID");
OnPlayerLogin(playerid);
}
}
return 1;
}
if(dialogid == DIALOG_LOGIN)
{
if(!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Please enter a valid password!", "Please enter your valid logging in password\nTo continue press log-in", "Log-in", "Quit");
else
{
Senha[64];
SHA256_PassHash(inputtext,HASH_SENHA,Senha,64);
mysql_format(ConnectMYSQL, query, sizeof(query), "SELECT * FROM accounts WHERE Senha = '%e' LIMIT 0,1", Senha);
mysql_pquery(ConnectMYSQL, query, "OnLogin", "d", playerid);
}
}
return 1;
}