03.07.2011, 15:37
pawn Код:
COMMAND:admins(playerid, params[])
{
new count;
SendClientMessage(playerid, COLOR_SYSTEMRED, "=========== Online Admins ===========");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdminLevel] >= 1)
{
count ++;
new name[MAX_PLAYER_NAME], string[21 + MAX_PLAYER_NAME];
GetPlayerName(i,name,sizeof(name));
format(string, sizeof(string), "(Level:%i) %s (ID:%i)", PlayerInfo[i][pAdminLevel], name, i);
SendClientMessage(playerid, COLOR_SYSTEMRED, string);
}
}
}
if(!count)
{
SendClientMessage(playerid, COLOR_SYSTEMRED, "No admins online at the moment");
}
SendClientMessage(playerid, COLOR_SYSTEMRED, "===================================");
return 1;
}