[SOLVED] /admins problem - writes about 10-15 lines
#4

pawn Код:
if(strcmp( cmd, "/admins", true ) == 0)
{
    SendClientMessage( playerid, COLOR_GREEN, "_______________Admins_______________" );
    for( new targetid=0; targetid<MAX_PLAYERS; targetid++ )
    {
     if( IsPlayerConnected(targetid) && PlayerInfo[targetid][pAdmin] >0 )
        {
            if( PlayerInfo[targetid][pAdmin] == 1 ){ format( string, sizeof(string), "* %s %s: (ID:%d)", AdminRank1, GetPlayerNameEx(targetid), targetid ); }
            else if( PlayerInfo[targetid][pAdmin] == 2 ){ format( string, sizeof( string ), "* %s %s: (ID:%d)", AdminRank2, GetPlayerNameEx(targetid), targetid ); }
            else if( PlayerInfo[targetid][pAdmin] == 3 ){ format( string, sizeof( string ), "* %s %s: (ID:%d)", AdminRank3, GetPlayerNameEx(targetid), targetid ); }
            else if( PlayerInfo[targetid][pAdmin] == 4 ){ format( string, sizeof( string ), "* %s %s: (ID:%d)", AdminRank4, GetPlayerNameEx(targetid), targetid ); }
            else if( PlayerInfo[targetid][pAdmin] == 5 ){ format( string, sizeof( string ), "* %s %s: (ID:%d)", AdminRank5, GetPlayerNameEx(targetid), targetid ); }
            else if( PlayerInfo[targetid][pAdmin] == 6 ){ format( string, sizeof( string ), "* %s %s: (ID:%d)", AdminRank6, GetPlayerNameEx(targetid), targetid ); }
            else if( PlayerInfo[targetid][pAdmin] == 7 ){ format( string, sizeof( string ), "* %s %s: (ID:%d)", AdminRank7, GetPlayerNameEx(targetid), targetid ); }
            else if( PlayerInfo[targetid][pAdmin] == 1337 ){ format( string, sizeof( string ), "* %s %s: (ID:%d)", AdminRank8, GetPlayerNameEx(targetid), targetid ); }
            SendClientMessage( playerid, COLOR_GRAD1, string );
        }
    }
    SendClientMessage( playerid, COLOR_GREEN, "_____________________________________" );
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)