12.02.2012, 18:12
pawn Код:
CMD:changepassword(playerid, params[])
{
if(isnull(params))
return SendClientMessage(playerid, -1, ""#LIME"<CMD USAGE> "#WHITE"/changepassword <new password>");
accInfo[playerid][Passcode] = udb_hash(params);
new
INI:accFile = INI_Open(find_accPath(playerid) );
INI_SetTag(accFile, "data");
INI_WriteInt(accFile, "Passcode", udb_hash(params) );
INI_Close(accFile);
format(pwStr, sizeof(pwStr), ""#CYAN"» "#WHITE"Your password has been changed from \"%s\" to \"%s\"", oldPass, params);
SendClientMessage(playerid, -1, pwStr);
return true;
}