12.02.2012, 17:22
I have no idea how your functions/codes look like, the code below is just a typical example. Change it according to your own settings.
pawn Код:
if(!strcmp(cmd, "/changepass", true, 11))
{
new tmp[32];
tmp = strtok(cmd, idx);
if(strlen(tmp) < 5 || strlen(tmp) > 20)
return SendClientMessage(playerid, -1, "Your new password needs to be within 5 - 20 characters.");
format
(
PlayerInfo[playerid][pKey],
sizeof PlayerInfo[playerid][pKey],
"%s", MD5_hash(tmp) //<-- Just replace MD5_hash with the function you use.
);
new message[128];
format
(
message,
sizeof message,
"Your new password has been set to: \"%s\" Use it yo login next time!",
tmp
);
SendClientMessage(playerid, -1, message);
return 1;
}