CMD:adminok(playerid, params[]){ printf(\"%s beirta a /adminok parancsot.\",JatekosNeve(playerid));for(new i = 0; i < MAX_PLAYERS; i++){ if(PlayerInfo[Admin] >= 1) { format(string,sizeof(string),\"%s\",JatekosNeve(i));}}ShowPlayerDialog(playerid, 12, DIALOG_STYLE_LIST, \"Adminok\",string,\"Ok\",\"mégse\");return 1;}
format(string,sizeof(string),\"%s%s\\n\",string, JatekosNeve(i));
CMD:adminok(playerid, params[]){ #pragma unused params new count = 0; new string[128]; SendClientMessage(playerid, green, \" \"); SendClientMessage(playerid, green, \"___________ |- Online Adminok -| ___________\");SendClientMessage(playerid, green, \" \");for(new i = 0; i < MAX_PLAYERS; i++){ if (IsPlayerConnected(i)) { if(PlayerInfo[Admin] >= 1) { format(string, 128, \"Szint: %d - %s (Id:%i)\",PlayerInfo[Admin], PlayerName2(i),i); SendClientMessage(playerid, ChangeColor, string); count++; } }}if (count == 0)SendClientMessage(playerid,red,\"Nincs Admin a Szerveren!\");SendClientMessage(playerid, green, \" _______________________________________\");return 1;}
SendClientMessagevel nekem is megy. Nekem Dialogban kell.[/quote]Ja tényleg, azt nem is figyeltem.Talán így: CMD:adminok(playerid, params[]){ static szStr[ 512 ], szName[ MAX_PLAYER_NAME ]; for( new i = 0; i < MAX_PLAYERS; ++i ) { if(PlayerInfo[Admin] >= 1){ if( !IsPlayerConnected( i ) || IsPlayerNPC( i ) ) continue; GetPlayerName( i, szName, MAX_PLAYER_NAME ); if( !szStr[ 0 ] ) format( szStr, sizeof szStr, \"%s Szint: %d\", szName, PlayerInfo[Admin] ); else format( szStr, sizeof szStr, \"%s\\n%s Szint: %d\", szStr, szName, PlayerInfo[Admin] ); } ShowPlayerDialog( playerid, 12, DIALOG_STYLE_LIST, \"Játékosok\", szStr, \"Ok\", \"Mégse\" ); szStr[ 0 ] = EOS; } return 1; } Nem teszteltem.
CMD:adminok(playerid, params[]){ static szStr[ 512 ], szName[ MAX_PLAYER_NAME ]; for( new i = 0; i < MAX_PLAYERS; ++i ) { if(PlayerInfo[Admin] >= 1){ if( !IsPlayerConnected( i ) || IsPlayerNPC( i ) ) continue; GetPlayerName( i, szName, MAX_PLAYER_NAME ); if( !szStr[ 0 ] ) format( szStr, sizeof szStr, \"%s Szint: %d\", szName, PlayerInfo[Admin] ); else format( szStr, sizeof szStr, \"%s\\n%s Szint: %d\", szStr, szName, PlayerInfo[Admin] ); } ShowPlayerDialog( playerid, 12, DIALOG_STYLE_LIST, \"Játékosok\", szStr, \"Ok\", \"Mégse\" ); szStr[ 0 ] = EOS; } return 1; }