19.01.2015, 15:42
pawn Код:
CMD:admins(playerid, params[])
{
new string[128], count = 0;
SendClientMessage(playerid, COLOR_WHITE, "Admins Online");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1)
{
if(PlayerInfo[i][pAdminDuty] == 1)
{
if(IsAFK[i] == 0)
{
format(string, sizeof(string), "%s: %s(ID: %d) Status: {FF0000}Roleplaying", AdminRankName(i), RemoveUnderScore(i), i);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
else
{
format(string, sizeof(string), "%s: %s(ID: %d) Status: {FF6600}Away From Keyboard", AdminRankName(i), RemoveUnderScore(i), i);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
}
else
{
if(IsAFK[i] == 0)
{
format(string, sizeof(string), "%s: %s(ID: %d) Status: {4BB74C}Administrating", AdminRankName(i), RemoveUnderScore(i), i);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
else
{
format(string, sizeof(string), "%s: %s(ID: %d) Status: {FF6600}Away From Keyboard", AdminRankName(i), RemoveUnderScore(i), i);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
}
}
}
if(count == 0)
{
SendClientMessage(playerid, COLOR_GREY, "There are currently no Admins online.");
}
return 1;
}
}