Help with Some Admin Bugs. -
MAFIAWARS - 22.09.2013
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;
}
Re: Help with Some Admin Bugs. -
DanishHaq - 22.09.2013
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.
Re: Help with Some Admin Bugs. -
MAFIAWARS - 22.09.2013
I didn't understand Man. Just Copy my /admin CMD and paste in your next reply with the correct Editing.
Re: Help with Some Admin Bugs. -
xganyx - 22.09.2013
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;
}
Re: Help with Some Admin Bugs. -
JimmyCh - 22.09.2013
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.
Re: Help with Some Admin Bugs. -
MAFIAWARS - 22.09.2013
If I make this to "0" then It will not show my name in /admins
Re: Help with Some Admin Bugs. -
MAFIAWARS - 22.09.2013
Okay Thank you Danish and Jimmy.
It is showing my ID now

But I also want that:
<0> MAFIA_WARS Level 1
Re: Help with Some Admin Bugs. -
JimmyCh - 22.09.2013
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;
}