25.12.2014, 16:01
Код:
CMD:admins(playerid,params[]) { new Count, string[128]; SendClientMessage(playerid, COLOR_RED, "__________|Online Admins|__________"); SendClientMessage(playerid, COLOR_RED, " "); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][pAdmin] >=1) { format(string,sizeof(string),"| Admin: %s(ID:%d) || Level: %s(%d) |",PlayerName(i),i,AdminLevelName(i),PlayerInfo[i][pAdmin]); SendClientMessage(playerid,COLOR_RED,string); Count++; } } } if(Count == 0) SendClientMessage(playerid, COLOR_RED, "None Admin Online"); SendClientMessage(playerid, COLOR_RED, "____________________________"); return 1; }CMD:admins(playerid,params[]) { new Count, string[128]; SendClientMessage(playerid, COLOR_RED, "__________|Online Admins|__________"); SendClientMessage(playerid, COLOR_RED, " "); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][pAdmin] >=1) { format(string,sizeof(string),"| Admin: %s(ID:%d) || Level: %s(%d) |",PlayerName(i),i,AdminLevelName(i),PlayerInfo[i][pAdmin]); SendClientMessage(playerid,COLOR_RED,string); Count++; } } } if(Count == 0) SendClientMessage(playerid, COLOR_RED, "None Admin Online"); SendClientMessage(playerid, COLOR_RED, "____________________________"); return 1; }
Код:
stock AdminLevelName(playerid) { new adminlevelname[128]; switch(PlayerInfo[playerid][pAdmin]) { case 0: adminlevelname = "Player"; case 1: adminlevelname = "Basic Admin"; case 2: adminlevelname = "Junior Admin"; case 3: adminlevelname = "Senior Admin"; case 4: adminlevelname = "Lead Admin"; case 5: adminlevelname = "Head Admin"; case 6: adminlevelname = "Community Co-Owner"; case 7: adminlevelname = "Community Owner"; } return adminlevelname; }