23.03.2014, 07:06
pawn Код:
CMD:admins(playerid, params[])
{
new OnlineAdmins = 0;
new Rank[150];
new adminstringpro[1208];
foreach(Player, i)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][aLevel] >= 5)
{
if(IsAdminUnderCover{i} == true)
{
continue;
}
else
{
switch(PlayerInfo[i][aLevel])
{
case 1:
{
Rank = "No";
}
case 2:
{
Rank = "No";
}
case 3:
{
Rank = "No";
}
case 4:
{
Rank = "No";
}
case 5:
{
Rank = "Moderator";
}
case 6:
{
Rank = "Server Administrator";
}
case 7:
{
Rank = "Trusted Administrator";
}
case 8:
{
Rank = "Server Owner";
}
}
format(adminstringpro, sizeof(adminstringpro),"%s%s - [Level:%d] - [ID:%d] - %s", adminstringpro, GetName(i), PlayerInfo[i][aLevel], i, Rank);
OnlineAdmins++;
}
}
}
}
if(OnlineAdmins == 0)
{
ShowPlayerDialog(playerid, 15321, DIALOG_STYLE_MSGBOX, "NVCNR Admin Online List", "No NVCNR Admin Online In the List\n Admins Are Also watching From console And IRC.", "Okay", "");
}
ShowPlayerDialog(playerid, 15321,DIALOG_STYLE_MSGBOX, "NVCNR Admin Online List", adminstringpro, "ok", "");
new astring[500];
format(astring, sizeof(astring),"%s [%d] typed: /admins", GetName(playerid), playerid);
SendAdminMessage(GREY, astring);
return true;
}