dcmd_admins(playerid,params[]) { #pragma unused paramsnew Count[2], i, string[128];for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)){if(PlayerInfo[Level] > 0) Count[0]++;if(IsPlayerAdmin(i)) Count[1]++;} #if defined HIDE_ADMINSif(PlayerInfo[playerid][Level] == 0) {if(Count[0] >= 1) { format(string, sizeof(string), \"Jelenleg: %d Admin online. Használd /report <id> <indok> hogy ha valakit csítelni látsz!\", Count[0]); return SendClientMessage(playerid, COLOR_YELLOW, string);} else return SendClientMessage(playerid, COLOR_YELLOW, \"Most jelenleg nincsenek online adminok\");}#endifif( (Count[0] == 0 && Count[1] == 0) || (Count[0] == 0 && Count[1] >= 1 && PlayerInfo[playerid][Level] == 0) ) return SendClientMessage(playerid, COLOR_YELLOW, \"Most jelenleg nincsenek online adminok\");if(Count[0] == 1) { for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] > 0) { format(string, sizeof(string), \"Admin: (%d)%s [%d]\", i, PlayerName2(i), PlayerInfo[Level] ); SendClientMessage(playerid, COLOR_YELLOW, string);}}if(Count[0] > 1) { new x; format(string, sizeof(string), \"Admins: \"); for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] > 0){ format(string,sizeof(string),\"%s(%d)%s [%d]\",string,i,PlayerName2(i),PlayerInfo[Level]); x++; if(x >= 5) { SendClientMessage(playerid, COLOR_YELLOW, string); format(string, sizeof(string), \"Admins: \"); x = 0; } else format(string, sizeof(string), \"%s, \", string); }if(x <= 4 && x > 0) { string[strlen(string)-3] = \'.\'; SendClientMessage(playerid, COLOR_YELLOW, string);}}if( (Count[1] == 1) && (PlayerInfo[playerid][Level] > 0) ) { for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && IsPlayerAdmin(i)) { format(string, sizeof(string), \"RCON Admin: (%d)%s\", i, PlayerName2(i)); SendClientMessage(playerid, COLOR_WHITE, string);}}if(Count[1] > 1) { new x; format(string, sizeof(string), \"RCON Admins: \"); for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && IsPlayerAdmin(i)){ format(string,sizeof(string),\"%s(%d)%s\",string,i,PlayerName2(i)); x++; if(x >= 5) { SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), \"RCON Admins: \"); x = 0; } else format(string, sizeof(string), \"%s, \", string); }if(x <= 4 && x > 0) { string[strlen(string)-3] = \'.\'; SendClientMessage(playerid, COLOR_WHITE, string);}}return 1;}
#define DIALOG_ONLINE 3422 //ezt rakd elõre. include-k után dcmd_admins(playerid,params[]) { new admin = 0; new str[256]; for(new i;i<MAX_PLAYERS;i++) { format(str,sizeof(str),\"%s{53e024}====================================\\n\\n\", str); if(PlayerInfo[Level] == 1) { format(str,sizeof(str),\"%s{e024c4}[Level 1]%s - Kezdõ\\n\", str, PlayerName2(i)); admin++; } if(PlayerInfo[Level] == 2) { format(str,sizeof(str),\"%s{e024c4}[Level 2]%s - Moderátor\\n\", str, PlayerName2(i)); admin++; } if(PlayerInfo[Level] == 3) { format(str,sizeof(str),\"%s{24e0d0}[Level 3]%s - Fõ Moderátor\\n\", str, PlayerName2(i)); admin++; } if(PlayerInfo[Level] == 4) { format(str,sizeof(str),\"%s{248fe0}[Level 4]%s - Adminisztrátor\\n\", str, PlayerName2(i)); admin++; } if(PlayerInfo[Level] == 5) { format(str,sizeof(str),\"%s{ff0000}[Level 5]%s - Fõadmin\\n\", str, PlayerName2(i)); admin++; } format(str,sizeof(str),\"%s\\n{53e024}====================================\", str); } if(admin >= 1) ShowPlayerDialog(playerid, DIALOG_ONLINE, DIALOG_STYLE_MSGBOX, \"{53e024}Online Adminok\", str, \"Bezár\", \"\"); if(admin == 0) ShowPlayerDialog(playerid,DIALOG_ONLINE, DIALOG_STYLE_MSGBOX,\"{53e024}Online Adminok\",\"{53e024}====================================\\n\\n{ff0000}Nincs online admin a szerveren!\\n\\n{53e024}====================================\",\"Bezár\",\"\"); return 1; }