12.01.2013, 08:01
Код:
CMD:admins( playerid, params[ ] ) { new liAdminCount = 0, AString[ 1042 ]; foreach(Player, i) { if( P_DATA[ i ][ Admin ] > 0 || IsPlayerAdmin( i ) ) { liAdminCount ++; } } if( liAdminCount == 0 ) return SCM( playerid, C_R, "[ERROR]: {FFFFFF}There's no admin online !"); new lsColorName[ 32 ]; if( liAdminCount == 1 ) format( AString, 2048, "{FFFFFF}Just {C0FF00}1 {FFFFFF}admin is online:\n\n" ); else format( AString, 2048, "{FFFFFF}Now are {FFAE00}%d {FFFFFF}admins online:\n\n", liAdminCount ); foreach( Player, i ) { if( !IsPlayerAdmin( i ) && P_DATA[ i ][ Admin ] > 0 ) { switch( P_DATA[ i ][ Admin ] ) { case 1: lsColorName = "{FFFFFF}Mini-Helper"; case 2: lsColorName = "{D0C5C5}Helper"; case 3: lsColorName = "{959595}Mini-Moderator"; case 4: lsColorName = "{00A2FF}Administrator"; case 5: lsColorName = "{005AFF}Moderator"; case 6: lsColorName = "{FFFFFF}Administrator"; case 7: lsColorName = "{FF0000}Mini-Owner"; case 8: lsColorName = "{AFFF00}Co-Owner"; case 9: lsColorName = "{C0FF00}sAdmin"; case 10: lsColorName = "{FFAF00}Owner"; } format( AString, 2048, "%s{%06x}%s [%d] - %s [%d]\n", AString, GetPlayerColor( i ) >>> 8, GetName( i ), i, lsColorName, P_DATA[ i ][ Admin ] ); } } SPD( playerid, adminsd, MSGBOX, "{FFFFFF}Admins:", AString, "OK", "" ); return ( 1 ); }
Can you help me ?