29.12.2011, 11:45
pawn Код:
if(strcmp(cmd,"/changepassword",true) == 0)
{
if(PlayerInfo[playerid][Admin] <5) return 1;
new id = -1;
id = strval(strtok(cmdtext,idx));
new password[256];
password = strtok(cmdtext,idx);
if(!IsPlayerConnected(id) || strval(password) == 0)return SendClientMessage(playerid,~0,"Use: /changepassword [playerid] [newpass]");
new playername[40];GetPlayerName(id,playername,40);
format(playername, 40, "Users/%s.ini",playername);
dini_Set(playername,"Password",MD5(password));
SendClientMessage(playerid,~0,"Password successeful changed!");
return 1;
}