14.12.2015, 11:12
This is a command to show admins online it is basicly the same princip for leaders...
Код:
YCMD:admins(playerid, params[]) { if(gPlayerLoggedIn[playerid] == 0) return 1; SendClientMessage(playerid, COLOR_WHITE, "Administrators online:"); foreach(Player, i) { new level[128], string[128]; if(PlayerInfo[playerid][Admin] == 0 && PlayerInfo[i][Admin] > 1 /*&& AdminDuty[i] == 1*/) { switch(PlayerInfo[i][Admin]) { case 2: level = "Junior Admin"; case 3: level = "General Administrator"; case 4: level = "Head Administrator"; case 5: level = "Community Owner"; } format(string, sizeof(string), "%s %s", level, PlayerName(i)); SendClientMessage(playerid, COLOR_GREY, string); } if(PlayerInfo[playerid][Admin] > 0) { switch(PlayerInfo[i][Admin]) { case 1: level = "Secret Admin (1)"; case 2: level = "Junior Admin (2)"; case 3: level = "General Administrator (3)"; case 4: level = "Head Administrator (4)"; case 5: level = "Community Owner (5)"; } format(string, sizeof(string), "%s %s", level, PlayerName(i)); SendClientMessage(playerid, COLOR_GREY, string); } } return 1; }