06.06.2016, 18:46
Trying make a cmd to change password but the cmd doesn't change the password, maybe you guys can help me, thanks in advance!
PHP код:
CMD:changepass(playerid, params[])
{
new string[256], hashpass[129], PlayerName2[MAX_PLAYER_NAME];
if(sscanf(params, "s[256]", params))return SendSyntaxMessage(playerid, " Usage: /changepass [password]");
format(string, 256, "/Users/%s.ini", PlayerName2);
new INI:file = INI_Open(string);
INI_SetTag(file,"data");
INI_WriteInt(file,"Password",udb_hash(params));
INI_Close(file);
SendServerMessage(playerid, "You change password to %s", params);
return 1;
}