case DIALOG_LOGIN: { if ( !response ) return SetTimerEx("KickPublic", 1500, 0, "d", playerid); if( response ) { if(!fexist(UserPath(playerid))) return ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Přihlбљenн","{ff0000}ERROR:\nNastala chyba so sъbormy !\nSъbor na zapisovanie dбt pre tento ъčet nieje vytvorenэ !!!\n\n{ffffff}Před vstupem do hry se musнљ nejdřнve přihlбsit\nZadej svй heslo:","Potvrdit",""); else if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Přihlбљenн","{ff0000}Nezadal si heslo !\n{ffffff}Před vstupem do hry se musнљ nejdřнve přihlбsit\nZadej svй heslo:","Potvrdit",""); else if(strcmp(DOF2_GetString(UserPath(playerid),"Password"),lyrhash(inputtext),true)) { PlayerInfo[playerid][FalseLogin]++; if(PlayerInfo[playerid][FalseLogin]<=2) { new Text2f[256]; format(Text2f,256,"{ff0000}Љpatnй heslo ! (Warning: %d/3)\n{ffffff}Před vstupem do hry se musнљ nejdřнve přihlбsit\nZadej svй heslo:",PlayerInfo[playerid][FalseLogin]); ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Přihlбљenн",Text2f,"Potvrdit",""); } else { SendClientMessage(playerid,COLOR_WARNING,"Љpatnй heslo ! (Warning 3/3)"); SetTimerEx("KickPublic", 1500, 0, "d", playerid); } } else { PlayerInfo[playerid][Admin] = DOF2_GetInt( UserPath(playerid),"Admin"); PlayerInfo[playerid][Gender] = DOF2_GetInt( UserPath(playerid),"Origin"); .............................................. .. .
stock lyrhash(what[])
{
new newstr[129];
new out[129];
new deflen = strlen(what);
new newlen = deflen;
new changeval[3] = {0, -1, 1};
format(newstr, 129, "%c%s", 1, what);
while(newlen < 128)
{
newstr[newlen] = newstr[newlen % (deflen + 1)];
newlen++;
}
for(new i=0; i<128; i++) changeval[0] += newstr[i];
changeval[1] -= (changeval[0] % 100) + newstr[deflen % 128];
changeval[2] = floatround(floatpower(changeval[0] % 216, changeval[1] % 4));
for(new i=0; i<128; i++)
{
out[i] = 65 + ((i + changeval[0] + changeval[1] + changeval[2]) % 26);
changeval[0] -= changeval[1];
changeval[1] -= i;
changeval[2] += changeval[0] % 5;
}
return out;
}
Password = KORVYENATQVIELBEUYSAASDJIEXOFULEABFQIISKOEHZEANSRIVEKPRUYEOASQVJEKBEVYRAATDIIEYOEULFAAFQJIRKOFHYEAOSQIVFKORUZENASRVI
Lyrhash?
It's like Whirpool PHP код:
PHP код:
|