14.02.2014, 08:30
But you can use much simple with this
I hope this will help you!
pawn Код:
CMD:admins( playerid, params[ ] )
{
vString[ 0 ] = EOS;
new
Adm
;
foreach(new i: Player)
{
if ( PlayerInfo[ i ][ Level ] > 0 )
{
format( vString, sizeof( vString ), "{FFFFFF}%s{00FF00}Admin {FF0000}%s {00FF00}- Level {FF0000}%d\n", vString, GetName( i ), PlayerInfo[ i ][ Level ] );
Adm++;
}
}
if ( Adm == 0 )
format( vString, sizeof( vString ), "\n{FF0000}No Administrators online at the moment!" );
ShowPlayerDialog( playerid, DIALOG_EMPTY, DIALOG_STYLE_LIST, "{FFFFFF}Online Administrators", vString, "Quit", "" );
return ( 1 );
}
And GetName stock
stock GetrName( playerid )
{
new name[ MAX_PLAYER_NAME ];
GetPlayerName( playerid, name, MAX_PLAYER_NAME );
return name;
}