16.01.2017, 01:49
How to make an Hide function or command for admins. so they will be hidden from admin list
PHP код:
if(strcmp(cmd, "/admins", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_WHITE, "**Online Administrators**");
//foreach(Player, i)
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PInfo[i][AdminLevel] > 0)
{
new rank[128];
if(PInfo[i][AdminLevel] == 1)
{
format(rank, sizeof(rank), "Junior Moderator");
}
else if(PInfo[i][AdminLevel] == 2)
{
format(rank, sizeof(rank),"Moderator");
}
else if(PInfo[i][AdminLevel] == 3)
{
format(rank, sizeof(rank),"Administrator");
}
else if(PInfo[i][AdminLevel] == 4)
{
format(rank, sizeof(rank),"Head Administrator");
}
else if(PInfo[i][AdminLevel] == 5)
{
format(rank, sizeof(rank),"Administrator");
}
else if(PInfo[i][AdminLevel] == 6)
{
format(rank, sizeof(rank),"Server Owner");
}
format(string, sizeof(string), "{FFFFFF}%s: {00FF00}%s(%d)",rank, PlayerName(i), i);
SendClientMessage(playerid, COLOR_GREEN, string);
}
}
}
}
return 1;
}