06.07.2013, 11:14
PHP Code:
dcmd_admins(playerid,params[])
{
#pragma unused params
//new count = 0;
new string[128];
new PlayerName2[MAX_PLAYER_NAME];
for(new i = 0; i <MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(AccInfo[i][Level] >= 1 && AccInfo[i][Hide] == 0)
{
if(AccInfo[i][Level] > 5)
{
AdmRank = "Server Owner";
}
if(IsPlayerAdmin(i))
{
AdmRank = "RCON Administrator";
}
else
{
switch(AccInfo[i][Level])
{
case 1: AdmRank = "Trial Moderator";
case 2: AdmRank = "Moderator";
case 3: AdmRank = "Administrator";
case 4: AdmRank = "Senior Administrator";
case 5: AdmRank = "Community Leader";
}
}
GetPlayerName(i, PlayerName2, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s (Id:%i) | %s", PlayerName2, i, AdmRank);
ShowPlayerDialog(playerid, 668, DIALOG_STYLE_MSGBOX, "Online Administrators",string,"Submit","Cancel");
}
}
}
return 1;
}