20.07.2013, 23:26
pawn Код:
CMD:admins(playerid, params[])
{
SendClientMessage(playerid, 0xFF5EFFFF, "|______________ Admins Online ______________|");
for(new i = 0; i <= MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i) == 1 && PlayerInfo[i][Administrador] > 0)
{
new LevelAdmin[128];
if(PlayerInfo[i][Administrador] == 1)
{
LevelAdmin = "Moderador [Level:1]";
}
if(PlayerInfo[i][Administrador] == 2)
{
LevelAdmin = "Sub-Administrador [Level: 2]";
}
if(PlayerInfo[i][Administrador] == 3)
{
LevelAdmin = "Administrador [Level: 3]";
}
if(PlayerInfo[i][Administrador] == 4)
{
LevelAdmin = "Master [Level: 4]";
}
if(PlayerInfo[i][Administrador] == 5)
{
LevelAdmin = "Sub-Dono [Level: 5]";
}
if(PlayerInfo[i][Administrador] == 6)
{
LevelAdmin = "Dono [Level: 6]";
}
GetPlayerName(i, Jogador, sizeof(Jogador));
if(PlayerInfo[i][Trabalhando] == 1)
{
format(Celula, 128, "{FFFFFF}%s: %s [{FF0000}Trabalhando{FFFFFF}]", Jogador, LevelAdmin);
ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Admins",Celula,"Confirmar","");
//SendClientMessage(playerid, -1, Celula);
}
if(PlayerInfo[i][Trabalhando] == 0)
{
format(Celula, 128, "{FFFFFF}%s: %s [{228B22}Jogando{FFFFFF}]", Jogador, LevelAdmin);
ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Admins",Celula,"Confirmar","");
//SendClientMessage(playerid, -1, Celula);
}
if(PlayerInfo[i][Trabalhando] == 2)
{
format(Celula, 128, "{FFFFFF}%s: %s [{FFD700}Ausente{FFFFFF}]", Jogador, LevelAdmin);
ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Admins",Celula,"Confirmar","");
//SendClientMessage(playerid, -1, Celula);
}
}
}
return true;
}