03.08.2013, 14:04
Untested and probably inefficient, but hey.
Add "new boolnDuty[MAX_PLAYERS];" at the top of your script and when a player goes on duty, use onDuty[playerid] = true;
Add "new boolnDuty[MAX_PLAYERS];" at the top of your script and when a player goes on duty, use onDuty[playerid] = true;
pawn Код:
CMD:admins(playerid, params[])
{
new pName[MAX_PLAYER_NAME], message[128];
SCM(playerid, -1, "Admins online:");
foreach(new i : Player) // assuming you use foreach.
{
if(IsPlayerAdmin(i))
{
GetPlayerName(i, pName, sizeof(pName));
if(onDuty[i] == true) // or whatever variable you use.
{
format(message, sizeof(message), "%s (ID %d)", pName, i);
SendClientMessage(playerid, COLOR_GREEN, message);
}
else
{
format(message, sizeof(message), "%s (ID %d)", pName, i);
SendClientMessage(playerid, -1, message);
}
}
}
return 1;
}