27.03.2015, 02:01
PHP код:
YCMD:ad(playerid, params[], help)
{
if(IsPlayerConnected(playerid))
{
new STNG[300];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(P_Data[i][pAdmin] > 1)
{
new admin[20];
if(P_Data[i][pAdmin] == 1) { admin = "[Level 1] Beginner"; }
else if(P_Data[i][pAdmin] == 2) { admin = "[Level 2] Smart"; }
else if(P_Data[i][pAdmin] == 3) { admin = "[Level 3] Clever"; }
else if(P_Data[i][pAdmin] == 4) { admin = "[Level 4] Expert"; }
else if(P_Data[i][pAdmin] == 5) { admin = "[Level 5] Owner"; }
new SDNM[MAX_PLAYER_NAME];
GetPlayerName(i, SDNM, sizeof(SDNM));
format(STNG, 300, "%s - [ID:%d] - %s", SDNM, i, admin);
}
else
{
SendClientMessage(COR_Definida, 128, "Nгo temos nenhum admin online no momento.");
}
}
}
ShowPlayerDialog(playerid, 21323123, DIALOG_STYLE_LIST, "Admins Online:", STNG, "Close", "");
}
return 1;
}