First of all, you will need a register/login system! Here is a nice tutorial Click
Click!
And Then:
pawn Код:
CMD:admins(playerid, params[])
{
new count = 0, string[256];
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] == 1)
{
format(string, sizeof(string),"- %s%s | (ID:%d) | Admin Level 1", string, GetName(i), i);
count++;
}
if(PlayerInfo[i][pAdmin] == 2)
{
format(string, sizeof(string),"- %s%s | (ID:%d) | Admin Level 2", string, GetName(i), i);
count++;
}
if(PlayerInfo[i][pAdmin] == 3)
{
format(string, sizeof(string),"- %s%s | (ID:%d) | Admin Level 3", string, GetName(i), i);
count++;
}
if(PlayerInfo[i][pAdmin] == 4)
{
format(string, sizeof(string),"- %s%s | (ID:%d) | Admin Level 4", string, GetName(i), i);
count++;
}
if(PlayerInfo[i][pAdmin] == 5)
{
format(string, sizeof(string),"- %s%s | (ID:%d) | Admin Level 5", string, GetName(i), i);
count++;
}
}
}
if(count == 0)
{
SendClientMessage(playerid, COLOR_GREEN, "");
SendClientMessage(playerid, COLOR_GREEN, "|======== Online Admins =======|");
SendClientMessage(playerid, COLOR_WHITE, "- No Admins Online at Time!");
SendClientMessage(playerid, COLOR_GREEN, "|==============================|");
}
else
{
SendClientMessage(playerid, COLOR_GREEN, "");
SendClientMessage(playerid, COLOR_GREEN, "|======== Online Admins =======|");
SendClientMessage(playerid, COLOR_WHITE, string);
SendClientMessage(playerid, COLOR_GREEN, "|==============================|");
}
return 1;
}
You will need ZCMD for that!