PHP код:
CMD:admins(playerid, params[])
{
new count;
new admtext[128];
new string[128],stringz[128];
for( new i = 0; i < MAX_PLAYERS; i++ )
{
if ( IsPlayerConnected( i ) )
{
if( pData[i][Admin] >= 1 )
{
switch( pData[i][Admin] )
{
case 10: admtext = "Server Owner";
case 9: admtext = "Management";
case 8: admtext = "xMs Special Admin";
case 7: admtext = "head admin";
case 6: admtext = "lead admin";
case 5: admtext = "ubber admin";
case 4: admtext = "Admin";
case 3: admtext = "Admin";
case 2: admtext = "Admin";
case 1: admtext = "Admin";
}
count++;
format( stringz , 128,"Total Admins Online ");
format( string, 128, "%s (ID:%d) Level:%d (%s)\n\nTotal XtremeX admins %d", GetName( i ), i , pData[i][Admin] , admtext, count);
ShowPlayerDialog( playerid , 190 , DIALOG_STYLE_MSGBOX , stringz , string, "Ok" , "Close" );
}
}
if (count == 0)
{
format( stringz , 128 ,"No Admins Online ");
format( string , 128 ,"Currently NO admin online\nAdmins Watching from IRC\nand Admins Eyes always on you" );
ShowPlayerDialog( playerid,191,DIALOG_STYLE_MSGBOX , stringz , string , "Ok" , "Close" );
}
if(count >= 0)
{
ShowPlayerDialog( playerid , 190 , DIALOG_STYLE_MSGBOX , stringz , string, "Ok" , "Close" );
}
}
return 1;
}