22.05.2016, 14:18
PHP код:
CMD:makeadmin(playerid, params[]) {
new
para1,
level;
if(sscanf(params, "ud", para1, level))
return SendClientMessage(playerid, COLOR_GRAD2, "{00E6FF}UTILIZARE:{FFFFFF} /makeadmin [IDJucator/ParteDinNume] [level(1-1338)]");
else if(pInfo[playerid][pAdmin] < 1 || !IsPlayerAdmin(playerid))
return SendClientMessage(playerid, COLOR_GRAD1, "{09F7DF}DENIED: {ffffff}No access");
else if(!IsPlayerConnected(para1))
return 1;
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pAdmin] = level;
printf("AdmWarning: %s has promoted %s to a level %d admin.", sendername, giveplayer, level);
format(string, sizeof(string), " You have been promoted to a level %d admin by %s", level, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, 128, "{D11515}[AdmWarning]: {FF9203}%s {FFFFFF}has set {FF9203}%s {FFFFFF}to a level {FF9203}%d {FFFFFF}admin.", sendername,giveplayer,level);
ABroadCast(COLOR_YELLOW,string,5);
return 1;
}