CMD:onlineadmin(playerid, params[]) { if(pInfo[playerid][Admin] > 1) { new string[50]; SendClientMessage(playerid, -1, "Online admin are:"); foreach(new i : Player) { if(pInfo[i][Admin] >= 1) { GetPlayerName(i, joueurdestinataire, sizeof(joueurdestinataire)); format(string, sizeof(string), "%s | Admin Level: %d", joueurdestinataire, pInfo[i][Admin]); SendClientMessage(playerid, -1, string); } } return 1; } return SendClientMessage(playerid, Rouge,"Unknown command"); }
CMD:admins(playerid, params[])
{
foreach(Player, i) {
if(IsPlayerAdmin(i))
{
SendClientMessage(playerid, -1, "Online Admins:");
format(string, sizeof(string), "Admin %s - ID %d.", GetName(i), i);
SendClientMessage(playerid, -1, string);
}
}
return 1;
}
What to you want to show ?
Admin connected with RCON ? Or admin without RCON ? If it's without RCON you can do something like this: ( adapt it with your GM): Код:
CMD:onlineadmin(playerid, params[]) { if(pInfo[playerid][Admin] > 1) { new string[50]; SendClientMessage(playerid, -1, "Online admin are:"); foreach(new i : Player) { if(pInfo[i][Admin] >= 1) { GetPlayerName(i, joueurdestinataire, sizeof(joueurdestinataire)); format(string, sizeof(string), "%s | Admin Level: %d", joueurdestinataire, pInfo[i][Admin]); SendClientMessage(playerid, -1, string); } } return 1; } return SendClientMessage(playerid, Rouge,"Unknown command"); } |