Problema intalnita (descriere):Am incercat sa criptez parolele in Whirlpool.Am facut ce zice aici:http://forum.sa-mp.com/showthread.php?t=65290,dartot nu se cripteaza, si merge acuma se salveaza in mysql dar intru pe sv ies si cand intru pe sv iara imi cere sa ma inregistrez, defapt doar sa ma loghez dar iar imi cere sa scrie daca sunt baiat/fata si sa fac iar tutorialul
Ero(area / rile) / warning-(ul / urile):n-am
Liniile de cod / sursa / script-ul(obligatoriu):
if(dialogid == 12346 || dialogid == 12347)
{
if(IsPlayerConnected(playerid))
{
if(!response)
{
SendClientMessage(playerid, COLOR_WHITE, "{0066FF}Info: {FFFFFF}Ai fost dat afara pentru ca ai refuzat logarea.");
Kick(playerid);
return 1;
}
if(strlen(inputtext) >= 4 && strlen(inputtext) <= 70)
{
new tmppass[64];
strmid(tmppass, inputtext, 0, 70, 70);
if(strlen(tmppass) < 4)
{
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
ShowPlayerDialog(playerid,12347,DIALOG_STYLE_PASSWORD,"{FFFFFF}Logare","{FFFFFF}Scrie {0066FF}parola contului tau {FFFFFF}mai jos:","Logare","Iesi");
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 5) { Kick(playerid); }
}
new buf[160];
WP_Hash(buf, sizeof (buf), tmppass);
OnPlayerLogin(playerid, buf);
}
else
{
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
ShowPlayerDialog(playerid,12347,DIALOG_STYLE_PASSWORD,"{FFFFFF}Logare","{FFFFFF}Scrie {0066FF}parola contului tau {FFFFFF}mai jos:","Logare","Iesi");
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 5) { Kick(playerid); }
}
}
}
if(dialogid == 410)
{
if(IsPlayerConnected(playerid))
{
if(!response)
{
GameTextForPlayer(playerid, "~n~~r~]~b~Alege alta~y~ parola~r~]",5000,3);
ShowPlayerDialog(playerid,410,DIALOG_STYLE_PASSWORD,"{FFFFFF}Schimba parola","Pentru masuri de securitate, trebuie sa iti schimbi parola. (Doar o data)n{FFFFFF}Scrie {0066FF}noua ta parola {FFFFFF}mai jos:","Schimba","Iesi");
return 1;
}
if(strlen(inputtext) <= 20)
{
new tmppass[64], sendersm[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendersm, sizeof(sendersm));
strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
new buf[160];
WP_Hash(buf, sizeof (buf), tmppass);
new query[256];
format(query, sizeof(string), "UPDATE players SET `password`='%s', Hacked='0' WHERE `username`='%s'", buf, sendersm);
mysql_query(query);
}
else
{
GameTextForPlayer(playerid, "~n~~r~]~b~Alege alta~y~ parola~r~]",5000,3);
ShowPlayerDialog(playerid,410,DIALOG_STYLE_PASSWORD,"{FFFFFF}Schimba parola","Pentru masuri de securitate, trebuie sa iti schimbi parola. (Doar o data)n{FFFFFF}Scrie {0066FF}noua ta parola {FFFFFF}mai jos:","Schimba","Iesi");
}
}
}
if(dialogid == 12345)
{
if(IsPlayerConnected(playerid))
{
if(!response)
{
SendClientMessage(playerid, COLOR_WHITE, "{0066FF}Info: {FFFFFF}Ai fost dat afara pentru ca nu ai acceptat inregistrarea.");
Kick(playerid);
return 1;
}
if(strlen(inputtext) >= 4 && strlen(inputtext) <= 70)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new sqlaccountexists = MySQLCheckAccount(sendername);
if (sqlaccountexists != 0)
{
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, "{0066FF}Info: {FFFFFF}Acel nume este deja folosit, alege altul.");
return 1;
}
new tmppass[64];
mysql_real_escape_string(inputtext, tmppass);
if(strlen(tmppass) < 4)
{
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
ShowPlayerDialog(playerid,12347,DIALOG_STYLE_PASSWORD,"{FFFFFF}Logare","{FFFFFF}Scrie {0066FF}parola contului tau {FFFFFF}mai jos:","Logare","Iesi");
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 5) { Kick(playerid); }
}
new buf[160];
WP_Hash(buf, sizeof (buf), tmppass);
OnPlayerRegister(playerid, tmppass);
}
else
{
//new regstring[128];
new regname[64];
GetPlayerName(playerid,regname,sizeof(regname));
ShowPlayerDialog(playerid,12347,DIALOG_STYLE_PASSWORD,"{FFFFFF}Inregistrare","{FFFFFF}Scrie {0066FF}parola contului tau {FFFFFF}mai jos:","Inregistrare","Iesi");
}
}
}
Imagini / Video (optional):Nu am
Ati incercat sa rezolvati singur?:Da
Question
Jimmi
Problema intalnita (descriere):Am incercat sa criptez parolele in Whirlpool.Am facut ce zice aici:http://forum.sa-mp.com/showthread.php?t=65290,dartot nu se cripteaza, si merge acuma se salveaza in mysql dar intru pe sv ies si cand intru pe sv iara imi cere sa ma inregistrez, defapt doar sa ma loghez dar iar imi cere sa scrie daca sunt baiat/fata si sa fac iar tutorialul
Imagini / Video (optional):Nu amEro(area / rile) / warning-(ul / urile):n-am
Liniile de cod / sursa / script-ul(obligatoriu):
Ati incercat sa rezolvati singur?:Da
Link to comment
Share on other sites
5 answers to this question
Recommended Posts