02.07.2013, 06:56
This will be good now.
pawn Код:
CMD:changepass(playerid,params[])
{
new pass,string[128],name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
if(sscanf(params,"s",pass)) return SendClientMessage(playerid,0xCCCCCCAA,"/changepass [new password]");
if(pass > 24 || pass < 0) return SendClientMessage(playerid,0xCCCCCCAA,"Invalid character length.");
pInfo[playerid][pPass] = pass;
format(string,sizeof(string),"You've changed your password to %s",pass);
SendClientMessage(playerid,0xFF4000AA,string);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(pInfo[i][pAdmin] > 1)
{
format(string,sizeof(string),"%s changed his password to %s",name,pass);
SendClientMessage(i,0xFFFFFFAA,string);
}
}
return 1;
}