08.03.2015, 12:24
It actually changes the hash in password but i can't login with new password,i can log only with old pass
Код:
CMD:changepass(playerid,params[])
{
new newstring[128];
new newpass[129];
if(PInfo[playerid][Logged] == 0)
return SendClientMessage(playerid,STEALTH_BLUE,"You need to be logged in first.");
if(sscanf(params,"s[128]",newpass))
return SendClientMessage(playerid,STEALTH_BLUE,"USAGE: /changepass [new pass]");
format(newstring, sizeof(newstring), "You have successfully changed your password to %s",newpass);
SendClientMessage(playerid,COLOR_PALEGREEN,newstring);
WP_Hash(newpass,sizeof(newpass),newstring);
new INI:file = INI_Open(Path(playerid));
PInfo[playerid][Password] = newpass;
INI_Close(file);
return 1;
}


