06.12.2012, 14:48
Hello I need some help, with the Hash function from Whirlpool
Thats the dialogresponce from the register window.
then I got my Register function:
but the file shows:
What did I do wrong?
pawn Code:
case 3895:
{
new string[128];
format(string, sizeof(string), "Accounts/%s.ini", GetName(playerid));
if(response == 0)
{
Kick(playerid);
}
else
{
if(!fexist(string))
{
if(strlen(inputtext) >= 1)
{
new pw[128];
WP_Hash(pw, sizeof (pw), inputtext);
RegisterPlayer(playerid, pw);
}
else
{
SendClientMessage(playerid, WHITE, "Must be longer than 1 char.");
}
}
else
{
SendClientMessage(playerid, WHITE, "Your account already exists.");
}
}
}
then I got my Register function:
pawn Code:
public RegisterPlayer(playerid, password[])/*register*/
{
new string[128], Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
format(string, sizeof(string), "Accounts/%s.ini", Name);
if(!fexist(string))
{
dini_Create(string);
dini_Set(string, "Password", password);
format(Player[playerid][Password], 128, "%s", password);
Code:
Password=