12.07.2011, 10:48
An example of an /admins command ( with IsPlayerAdmin check, change with your own. )
That should helps.
pawn Код:
CMD:admins( playerid, params[ ] )
{
new
iCounts,
tempString[ 128 ],
admName[ 24 ]
;
SendClientMessage( playerid, -1, "Current online administrators:" );
foreach (Player, i)
{
if ( IsPlayerAdmin( i ) )
{
counts ++;
GetPlayerName( i, admName, sizeof admName );
format( tempString, sizeof ( tempString ), "%s ( %d )", admName, i );
// format( tempString, sizeof ( tempString ), "%s ( %d ) : Level : %d.", admName, i, pInfo[ playerid ][ pLevel ] );
SendClientMessage( playerid, tempString );
}
}
if ( !counts )
SendClientMessage( playerid, "No administrators online." );
return 1;
}