23.12.2013, 03:48
Quickly whipped this up
give it a go
give it a go
pawn Code:
CMD:admins(playerid, params[])
{
new adminstring[128];
new AdminDuty[128];
new totadmins = 0;
if(pInfo[playerid][pHour] >= 1)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(pInfo[i][pAdminLevel] > 0)
{
switch(pInfo[i][pAdminDuty])
{
case 0: AdminDuty = "Playing!";
case 1: AdminDuty = "OnDuty!";
}
format(adminstring, sizeof(adminstring),"%s%s %s\n", adminstring, GetAdminName(i), PlayerName(i));
totadmins++;
}
}
}
}
else return SendClientMessage(playerid,-1,""chat" You cannot view admins online (You need 1 hours IG time)");
if(totadmins == 0) return SendClientMessage(playerid,-1,""chat" No Admins Online");
ShowPlayerDialog(playerid,DIALOG_ADMINS,DIALOG_STYLE_MSGBOX,"Online admins",adminstring,"Close","");
return 1;
}