Help with Some Admin Bugs.
#1

Hello. When I am doing /admins, It is showing my name but it isn't showing the Valid ID of me.
Look here:



That script I am using:
pawn Код:
CMD:admins( playerid, params[ ] )
{
    new
        count
    ;
    SendClientMessage( playerid, COLOR_YELLOW, "[ ! ] List of Online Administrators:" );
    for( new i = 0; i < MAX_PLAYERS; i++ )
    {
        if( !IsPlayerConnected( i ) ) continue;
        if( pInfo[i][pAdminlevel] > 99999999999999999999999999 )
        {
            new
                temp[ 32 ],
                name_[ MAX_PLAYER_NAME ]
            ;
            GetPlayerName( i, name_, MAX_PLAYER_NAME );
            format( temp, sizeof( temp ), "<%d> %s", pInfo[ i ][ pAdminLevel ], name_ );
            SendClientMessage( playerid, 0xFF0000FF, temp );
            count++;
        }
    }
    if(count == 0)
    {
        SendClientMessage( playerid, COLOR_RED1, "- No Admins Currently Online." );
        SendClientMessage( playerid, COLOR_YELLOW, "[ ! ] End of List !" );
    }
    else SendClientMessage( playerid, COLOR_YELLOW, "[ ! ] End of List !" );
    return 1;
}
Reply
#2

Looking at that, it's showing your admin level. What's it suppose to show? If it's suppose to show the admin level, what admin level are you in the scriptfiles under your account? If it's suppose to show your player ID, use "i" instead of "pInfo[i][pAdminLevel]" upon the format of the temp.
Reply
#3

I didn't understand Man. Just Copy my /admin CMD and paste in your next reply with the correct Editing.
Reply
#4

pawn Код:
CMD:admins( playerid, params[ ] )
{
    new
        count
    ;
    SendClientMessage( playerid, COLOR_YELLOW, "[ ! ] List of Online Administrators:" );
    for( new i = 0; i < MAX_PLAYERS; i++ )
    {
        if( !IsPlayerConnected( i ) ) continue;
        if( pInfo[i][pAdminlevel] > 99999999999999999999999999 ) //You should make this > 0 @@
        {
            new
                temp[ 32 ],
                name_[ MAX_PLAYER_NAME ]
            ;
            GetPlayerName( i, name_, MAX_PLAYER_NAME );
            format( temp, sizeof( temp ), "<%i> %s", i, name_ );
            SendClientMessage( playerid, 0xFF0000FF, temp );
            count++;
        }
    }
    if(count == 0)
    {
        SendClientMessage( playerid, COLOR_RED1, "- No Admins Currently Online." );
        SendClientMessage( playerid, COLOR_YELLOW, "[ ! ] End of List !" );
    }
    else SendClientMessage( playerid, COLOR_YELLOW, "[ ! ] End of List !" );
    return 1;
}
Reply
#5

1, he doesn't work for you so be nicer.
2, if you want it to show your ID, use this:
pawn Код:
CMD:admins( playerid, params[ ] )
{
    new
        count
    ;
    SendClientMessage( playerid, COLOR_YELLOW, "[ ! ] List of Online Administrators:" );
    for( new i = 0; i < MAX_PLAYERS; i++ )
    {
        if( !IsPlayerConnected( i ) ) continue;
        if( pInfo[i][pAdminlevel] > 99999999999999999999999999 )
        {
            new
                temp[ 32 ],
                name_[ MAX_PLAYER_NAME ]
            ;
            GetPlayerName( i, name_, MAX_PLAYER_NAME );
            format( temp, sizeof( temp ), "<%d> %s", i, name_ );
            SendClientMessage( playerid, 0xFF0000FF, temp );
            count++;
        }
    }
    if(count == 0)
    {
        SendClientMessage( playerid, COLOR_RED1, "- No Admins Currently Online." );
        SendClientMessage( playerid, COLOR_YELLOW, "[ ! ] End of List !" );
    }
    else SendClientMessage( playerid, COLOR_YELLOW, "[ ! ] End of List !" );
    return 1;
}
The way it is now, it shows the admin level.
The edit I gave you shows his ID.
Reply
#6

If I make this to "0" then It will not show my name in /admins
Reply
#7

Okay Thank you Danish and Jimmy.
It is showing my ID now But I also want that:

<0> MAFIA_WARS Level 1
Reply
#8

Done, use this:
pawn Код:
CMD:admins( playerid, params[ ] )
{
    new
        count
    ;
    SendClientMessage( playerid, COLOR_YELLOW, "[ ! ] List of Online Administrators:" );
    for( new i = 0; i < MAX_PLAYERS; i++ )
    {
        if( !IsPlayerConnected( i ) ) continue;
        if( pInfo[i][pAdminlevel] > 99999999999999999999999999 )
        {
            new
                temp[ 32 ],
                name_[ MAX_PLAYER_NAME ]
            ;
            GetPlayerName( i, name_, MAX_PLAYER_NAME );
            format( temp, sizeof( temp ), "<%d> %s((Admin Level: %d))", i, name_, pInfo[ i ][ pAdminLevel ] );
            SendClientMessage( playerid, 0xFF0000FF, temp );
            count++;
        }
    }
    if(count == 0)
    {
        SendClientMessage( playerid, COLOR_RED1, "- No Admins Currently Online." );
        SendClientMessage( playerid, COLOR_YELLOW, "[ ! ] End of List !" );
    }
    else SendClientMessage( playerid, COLOR_YELLOW, "[ ! ] End of List !" );
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)