04.06.2016, 16:08
Hello Guys I Am Not Able To Make That when a person type /admins command the name of online admins come in box.Here is my code
Код:
CMD:admins(playerid,params[]) { new count = 0, string[256], AdmRank[500]; SendClientMessage(playerid,red,""); SendClientMessage(playerid,COLOR_ORANGE,"»»Online Admins»»"); new ChangeColor; for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][Level] > 0) { if(PlayerInfo[i][Level] == 1) { AdmRank = "Junior Admin"; ChangeColor = Color_Trial_Admin; } else if(PlayerInfo[i][Level] == 2) { AdmRank = "Senior Admin"; ChangeColor = Color_Server_Admin; } else if(PlayerInfo[i][Level] == 3) { AdmRank = "Head Admin"; ChangeColor = Color_Senior_Admin; } else if(PlayerInfo[i][Level] == 4) { AdmRank = "Management(Server Team)"; ChangeColor = Color_Lead_Admin; } else if(PlayerInfo[i][Level] == 5) { AdmRank = "Server Owner(Rcon Admin)"; ChangeColor = Color_Global_Admin; } else if(PlayerInfo[i][Level] == 6) { AdmRank = "Community Developer/Scripter"; ChangeColor = Color_Server_Owner; } else if(PlayerInfo[i][Level] >= 7) { AdmRank = "Community Owner"; ChangeColor = Color_RCON_Administrator; } else if(PlayerInfo[i][Level] >= 8) { AdmRank = "Community Owner"; ChangeColor = Color_RCON_Administrator; } new Name[MAX_PLAYER_NAME]; GetPlayerName(i,Name,sizeof(Name)); { format(string, sizeof(string), "Level: %d | Name: %s (ID:%i) | Rank: %s", PlayerInfo[i][Level], Name, i, AdmRank); SendClientMessage(playerid,ChangeColor,string); count++; } } } } if(count == 0) SendClientMessage(playerid,red,"No Admins online!"); SendClientMessage(playerid,COLOR_ORANGE,"________________________"); return 1; }