27.03.2015, 11:05
Saudaзхes !
PHP код:
YCMD:admins(playerid, params[], help)
{
if(IsPlayerConnected(playerid)){
new box[ 300 ];
static
STNG[80],
bool:Count = false
;
for(new i = 0; i < GetMaxPlayers(); i++){
if(IsPlayerConnected(i)){
if(P_Data[i][pAdmin] > 0){
new admin[ 25 ];
switch(P_Data[i][pAdmin]){
case 1: admin = "[Level 1] - Beginner";
case 2: admin = "[Level 2] - Smart";
case 3: admin = "[Level 3] - Clever";
case 4: admin = "[Level 4] - Expert";
case 5: admin = "[Level 5] - Owner";
}
Count = true;
new SDNM[MAX_PLAYER_NAME];
GetPlayerName(i, SDNM, sizeof(SDNM));
format(STNG, 300, "%s {FF0000}- {5252FF}[ID:%d] {FF0000}- {FF0000}%s\n", SDNM, i, admin);
strcat(STNG, box);
}
}
}
if(!Count == true)
ShowPlayerDialog(playerid, 21323123, DIALOG_STYLE_MSGBOX, "Admins Online:", "{FF0000}Nгo hб Admins online no momento!", "Close", "");
else
ShowPlayerDialog(playerid, 21323123, DIALOG_STYLE_LIST, "Admins Online:", box, "Close", "");
}
return true;
}