03.02.2014, 23:21
pawn Код:
YCMD:staff(playerid, params[], help)
{
#pragma unused params
if(help) return SCM(playerid, COLOR_GREY, "Not supported");
SCM(playerid, COLOR_YELLOW, "Admins");
new pName[MAX_PLAYER_NAME];
foreach(new i : Player)
{
if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] <= 6)
{
new admtext[14];
if(PlayerInfo[i][pAppearList] == 1 || PlayerInfo[i][pAppearList] == 0)
{
format(admtext, sizeof admtext, "Admin level %d", PlayerInfo[playerid][pAdmin]);
GetPlayerName(i, pName, sizeof(pName));
format(string, sizeof(string), "%s: %s %s", admtext, pName, (PlayerInfo[i][pAdminDuty] ? ("- On Duty") : ("")));
SCM(playerid, COLOR_GRAD, string);
}
}
}
SCM(playerid, COLOR_YELLOW, "Mods");
foreach(new i : Player)
{
if(PlayerInfo[i][pMod] == 1)
{
new admtext[10];
if(PlayerInfo[i][pAppearList] == 1 || PlayerInfo[i][pAppearList] == 0)
{
if(PlayerInfo[i][pMod] == 1) { admtext = "Moderator"; }
GetPlayerName(i, pName, sizeof(pName));
format(string, sizeof string, "%s: %s %s", admtext, pName, (PlayerInfo[i][pModDuty] ? ("- On Duty") : ("")));
SCM(playerid, COLOR_GRAD, string);
}
}
}
return 1;
}