26.06.2016, 14:02
PHP код:
CMD:admins(playerid)
{
if(PlayerInfo[playerid][pVip] >= 1 || PlayerInfo[playerid][Level] >= 1)
{
Str[0] = '\0'; new TotalCount = 0, HonnCaption[52], Status[64], HonnT[24];
//----------------------------------------------------------------------
foreach(new i: Player) if(PlayerInfo[i][Level] >= 1)
{
if(IsPlayerAdmin(i)) HonnT = "{00FF00}Yes";
else if(!IsPlayerAdmin(i)) HonnT = "{FF0000}No";
//------------------------------------------------------------------
if(PlayerInfo[i][AFKBRB] == 1) Status = "{FFFF00}AFK";
else if(PlayerInfo[i][Hidden] == 1) Status = "{FF8000}Hidden";
else Status = "{FFFFFF}Playing";
//------------------------------------------------------------------
format(Str, sizeof(Str), "{00FF00}%s{FFFFFF}(%d)\t{00BBF6}%d\t%s\t%s\n%s", PlayerName(i), i, PlayerInfo[i][Level], Status, HonnT, Str); TotalCount++;
}
//----------------------------------------------------------------------
format(HonnCaption, 128, "{00BBF6}Online Admins - {FF0000}%d", TotalCount);
//----------------------------------------------------------------------
switch(TotalCount)
{
case 0: return GameTextForPlayer(playerid, "~w~~h~No Admins ~r~~h~Online", 3000, 4);
case 1: return ShowPlayerDialog(playerid, 123, DIALOG_STYLE_LIST, HonnCaption, Str, "Close", "");
default:
{
format(Str, sizeof(str), "Admin Name\tLevel\tStatus\tRCON Access\n%s", Str);
return ShowPlayerDialog(playerid, 123, DIALOG_STYLE_TABLIST_HEADERS, HonnCaption, Str, "Close", "");
}
}
}
else return SendLangInfo(playerid, "{FF0000}Vrei sa raportezi un jucator? Foloseste /Report [ID] [Motiv] !", "Do you wanna report someone? Use /Report [ID] [Reason] !");
}