SA-MP Forums Archive
Integrate 2 Commands [Reps for help!!!] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Integrate 2 Commands [Reps for help!!!] (/showthread.php?tid=492940)



Integrate 2 Commands [Reps for help!!!] - Mahde - 06.02.2014

how to integrate admins and vips in one command like /admins , show vips and admins in same time here is the codes:
Код:
CMD:admins(playerid,params[])
{
   new IsOnline = 0;
   strdel(JLstring,0,500);
   foreach(Player, i)
   {
      if (pInfo[i][pLevel] >= 1 && pInfo[i][AHide] == 0)
	  {
 		      switch(pInfo[i][pLevel])
              {
			      case 1: {
				  LevelName = ADMIN_LEVEL_1;
				  LevelColor = LEVEL_1_COLOR;
				  }
				  case 2: {
				  LevelName = ADMIN_LEVEL_2;
				  LevelColor = LEVEL_2_COLOR;
				  }
				  case 3: {
				  LevelName = ADMIN_LEVEL_4;
				  LevelColor = LEVEL_3_COLOR;
				  }
				  case 4: {
				  LevelName = ADMIN_LEVEL_3;
				  LevelColor = LEVEL_4_COLOR;
				  }
				  case 5: {
				  LevelName = ADMIN_LEVEL_5;
				  LevelColor = LEVEL_5_COLOR;
				  }
				  default: {
				  LevelName = ADMIN_LEVEL_6;
				  LevelColor = LEVEL_6_COLOR;
				  }
	          }
	          if (IsPlayerAdmin(i)) format(Jstring, 128, "{FF0000}%s - Level: %d (RCON Administrator)\n",GetName(i),pInfo[i][pLevel]);
	          else format(Jstring, 128, "%s%s - Level: %d (%s)\n",LevelColor,GetName(i),pInfo[i][pLevel],LevelName);
			  strcat(JLstring, Jstring, sizeof(JLstring));
			  IsOnline++;
		}
   }
   if (IsOnline == 0)
   ShowPlayerDialog(playerid,JDIALOGS+165,DIALOG_STYLE_MSGBOX,"{00FFE6}Online admins","{FF0000}No admins are online!" ,"OK","");
   else
   {
       if(IsOnline == 1) ShowPlayerDialog(playerid,JDIALOGS+165,DIALOG_STYLE_MSGBOX,"{00FFE6}1 admin online",JLstring ,"OK","");
	   else format(Jstring, 128, "{00FFE6}%d admins online",IsOnline), ShowPlayerDialog(playerid,JDIALOGS+165,DIALOG_STYLE_MSGBOX,Jstring,JLstring ,"OK","");
   }
   strdel(JLstring,0,500);
   return 1;
}
VIPS:
Код:
CMD:vips(playerid,params[])
{
   new IsOnline = 0;
   strdel(JLstring,0,500);
   foreach(Player, i)
   {
      if (pInfo[i][Donator] >= 1)
	  {
 		      switch(pInfo[i][Donator])
              {
			      case 1:
				  {
					  LevelName = VIP_LEVEL_1;
					  LevelColor = VIP_1_COLOR;
				  }
				  case 2:
				  {
					  LevelName = VIP_LEVEL_2;
					  LevelColor = VIP_2_COLOR;
				  }
				  default:
				  {
					  LevelName = VIP_LEVEL_3;
					  LevelColor = VIP_3_COLOR;
				  }
	          }
			  format(Jstring, 128, "%s%s - Level: %d (%s)\n",LevelColor,GetName(i),pInfo[i][Donator],LevelName);
			  strcat(JLstring, Jstring, sizeof(JLstring));
			  IsOnline++;
		}
   }
   if (IsOnline == 0)
   ShowPlayerDialog(playerid,JDIALOGS+165,DIALOG_STYLE_MSGBOX,"{00FFE6}Online V.I.P members","{FF0000}No V.I.P members online!" ,"OK","");
   else
   {
       if(IsOnline == 1) ShowPlayerDialog(playerid,JDIALOGS+165,DIALOG_STYLE_MSGBOX,"{00FFE6}1 V.I.P member online",JLstring ,"OK","");
	   else format(Jstring, 128, "{00FFE6}%d V.I.P members online",IsOnline), ShowPlayerDialog(playerid,JDIALOGS+165,DIALOG_STYLE_MSGBOX,Jstring,JLstring ,"OK","");
   }
   strdel(JLstring,0,500);
   return 1;
}
Thank you!!


Re: Integrate 2 Commands [Reps for help!!!] - Misiur - 06.02.2014

pawn Код:
CMD:admins(playerid,params[])
{
    new IsOnline = 0;

    strdel(JLstring,0,500);
   
    foreach(Player, i)
    {
        if (pInfo[i][pLevel] >= 1 && pInfo[i][AHide] == 0)
        {
            switch(pInfo[i][pLevel])
            {
                case 1: {
                    LevelName = ADMIN_LEVEL_1;
                    LevelColor = LEVEL_1_COLOR;
                }
                case 2: {
                    LevelName = ADMIN_LEVEL_2;
                    LevelColor = LEVEL_2_COLOR;
                }
                case 3: {
                    LevelName = ADMIN_LEVEL_4;
                    LevelColor = LEVEL_3_COLOR;
                }
                case 4: {
                    LevelName = ADMIN_LEVEL_3;
                    LevelColor = LEVEL_4_COLOR;
                }
                case 5: {
                    LevelName = ADMIN_LEVEL_5;
                    LevelColor = LEVEL_5_COLOR;
                }
                default: {
                    LevelName = ADMIN_LEVEL_6;
                    LevelColor = LEVEL_6_COLOR;
                }
            }
            if (IsPlayerAdmin(i)) format(Jstring, 128, "{FF0000}%s - Admin Level: %d (RCON Administrator)\n",GetName(i),pInfo[i][pLevel]);
            else format(Jstring, 128, "%s%s - Admin Level: %d (%s)\n",LevelColor,GetName(i),pInfo[i][pLevel],LevelName);
            strcat(JLstring, Jstring, sizeof(JLstring));
            IsOnline++;
        }
        else if (pInfo[i][Donator] >= 1)
        {
            switch(pInfo[i][Donator])
            {
                case 1:
                {
                    LevelName = VIP_LEVEL_1;
                    LevelColor = VIP_1_COLOR;
                }
                case 2:
                {
                    LevelName = VIP_LEVEL_2;
                    LevelColor = VIP_2_COLOR;
                }
                default:
                {
                    LevelName = VIP_LEVEL_3;
                    LevelColor = VIP_3_COLOR;
                }
            }
            format(Jstring, 128, "%s%s - VIP Level: %d (%s)\n",LevelColor,GetName(i),pInfo[i][Donator],LevelName);
            strcat(JLstring, Jstring, sizeof(JLstring));
            IsOnline++;
        }
    }
    if(!IsOnline) ShowPlayerDialog(playerid,JDIALOGS+165,DIALOG_STYLE_MSGBOX,"{00FFE6}Online admins and vips","{FF0000}No admins or vips are online!" ,"OK","");
    else
    {
        if(IsOnline == 1) ShowPlayerDialog(playerid,JDIALOGS+165,DIALOG_STYLE_MSGBOX,"{00FFE6}1 admin or vip online",JLstring ,"OK","");
        else format(Jstring, 128, "{00FFE6}%d admins and vips online",IsOnline), SendClientMessage(playerid, 0xBADA55AA, "If this message shows up, scripter is a lazy copy & paster"), ShowPlayerDialog(playerid,JDIALOGS+165,DIALOG_STYLE_MSGBOX,Jstring,JLstring ,"OK","");
    }
    strdel(JLstring,0,500);
    return 1;
}



Re: Integrate 2 Commands [Reps for help!!!] - BullseyeHawk - 06.02.2014

Based on Misiur's script, I've just placed an duplicate fix. (If an admin is a donator too.)

pawn Код:
CMD:admins( playerid, params[] )
{
    new structCounter[2], bool:declared[MAX_PLAYERS];
    strdel(JLstring, 0, 500);
   
    foreach(Player, i)
    {
        if(pInfo[i][pLevel] > 0 && !pInfo[i][aHide])
        {
            switch(pInfo[i][pLevel])
            {
                case 1:
                {
                    LevelName = ADMIN_LEVEL_1;
                    LevelColor = LEVEL_1_COLOR;
                }
                case 2:
                {
                    LevelName = ADMIN_LEVEL_2;
                    LevelColor = LEVEL_2_COLOR;
                }
                case 3:
                {
                    LevelName = ADMIN_LEVEL_3;
                    LevelColor = LEVEL_3_COLOR;
                }
                case 4:
                {
                    LevelName = ADMIN_LEVEL_4;
                    LevelColor = LEVEL_4_COLOR;
                }
                case 5:
                {
                    LevelName = ADMIN_LEVEL_5;
                    LevelColor = LEVEL_5_COLOR;
                }
                default:
                {
                    LevelName = ADMIN_LEVEL_6;
                    LevelColor = LEVEL_6_COLOR;
                }
            }
            if(IsPlayerAdmin(i))
                format(Jstring, 128, "{FF0000}%s - Level: %d (RCON Administrator)\n", GetName(i), pInfo[i][pLevel]);
            else
                format(Jstring, 128, "%s%s - Level: %d (%s)\n", LevelColor, GetName(i), pInfo[i][pLevel], LevelName);
               
            strcat(JLstring, Jstring, sizeof(JLstring));
            ++structCounter[0];
            declared[i] = true;
        }
        else if(pInfo[i][Donator] > 0 && declared[i] == false)
        {
            switch(pInfo[i][Donator])
            {
                case 1:
                {
                    LevelName = VIP_LEVEL_1;
                    LevelColor = VIP_1_COLOR;
                }
                case 2:
                {
                    LevelName = VIP_LEVEL_2;
                    LevelColor = VIP_2_COLOR;
                }
                default:
                {
                    LevelName = VIP_LEVEL_3;
                    LevelColor = VIP_3_COLOR;
                }
            }
            format(Jstring, 128, "%s%s - VIP Level: %d (%s)\n", LevelColor, GetName(i), pInfo[i][Donator], LevelName);
            strcat(JLstring, Jstring, sizeof(JLstring));
            ++structCounter[1];
        }
       
        if(!(structCounter[0] + structCounter[1]))
        {
            ShowPlayerDialog(playerid,JDIALOGS+165,DIALOG_STYLE_MSGBOX,"{00FFE6}Online admins and vips","{FF0000}No admins nor VIPs online!" ,"OK","");
        }
        else
        {
            format(Jstring, 128, "{00FFE6}%d admins online, %d vips online",structCounter[0], structCounter[1]), SendClientMessage(playerid, 0xBADA55AA, "I agree with Misiur."), ShowPlayerDialog(playerid,JDIALOGS+165,DIALOG_STYLE_MSGBOX,Jstring,JLstring ,"OK","");
        }
        strdel(JLstring,0,500);
    }
}



Re: Integrate 2 Commands [Reps for help!!!] - Misiur - 06.02.2014

There was no need for a fix.
Код:
else if(pInfo[i][Donator] > 0 && declared[i] == false)
Else if is executed only if previous condition was not met. If the OP wanted some more specific counting of vips and admins, then yeah, that'd be helpful.


Re: Integrate 2 Commands [Reps for help!!!] - BullseyeHawk - 06.02.2014

Quote:
Originally Posted by Misiur
Посмотреть сообщение
There was no need for a fix.
Код:
else if(pInfo[i][Donator] > 0 && declared[i] == false)
Else if is executed only if previous condition was not met. If the OP wanted some more specific counting of vips and admins, then yeah, that'd be helpful.
Oh yeah.. the 'else if' defenition just slipped out of my mind.
That makes all of the declare[%0] code useless, wops.

Fixed snippet if OP needs.
pawn Код:
CMD:admins( playerid, params[] )
{
    new structCounter[2], bool:declared[MAX_PLAYERS];
    strdel(JLstring, 0, 500);
   
    foreach(Player, i)
    {
        if(pInfo[i][pLevel] > 0 && !pInfo[i][aHide])
        {
            switch(pInfo[i][pLevel])
            {
                case 1:
                {
                    LevelName = ADMIN_LEVEL_1;
                    LevelColor = LEVEL_1_COLOR;
                }
                case 2:
                {
                    LevelName = ADMIN_LEVEL_2;
                    LevelColor = LEVEL_2_COLOR;
                }
                case 3:
                {
                    LevelName = ADMIN_LEVEL_3;
                    LevelColor = LEVEL_3_COLOR;
                }
                case 4:
                {
                    LevelName = ADMIN_LEVEL_4;
                    LevelColor = LEVEL_4_COLOR;
                }
                case 5:
                {
                    LevelName = ADMIN_LEVEL_5;
                    LevelColor = LEVEL_5_COLOR;
                }
                default:
                {
                    LevelName = ADMIN_LEVEL_6;
                    LevelColor = LEVEL_6_COLOR;
                }
            }
            if(IsPlayerAdmin(i))
                format(Jstring, 128, "{FF0000}%s - Level: %d (RCON Administrator)\n", GetName(i), pInfo[i][pLevel]);
            else
                format(Jstring, 128, "%s%s - Level: %d (%s)\n", LevelColor, GetName(i), pInfo[i][pLevel], LevelName);
               
            strcat(JLstring, Jstring, sizeof(JLstring));
            ++structCounter[0];
            declared[i] = true;
        }
        if(pInfo[i][Donator] > 0 && declared[i] == false)
        {
            switch(pInfo[i][Donator])
            {
                case 1:
                {
                    LevelName = VIP_LEVEL_1;
                    LevelColor = VIP_1_COLOR;
                }
                case 2:
                {
                    LevelName = VIP_LEVEL_2;
                    LevelColor = VIP_2_COLOR;
                }
                default:
                {
                    LevelName = VIP_LEVEL_3;
                    LevelColor = VIP_3_COLOR;
                }
            }
            format(Jstring, 128, "%s%s - VIP Level: %d (%s)\n", LevelColor, GetName(i), pInfo[i][Donator], LevelName);
            strcat(JLstring, Jstring, sizeof(JLstring));
            ++structCounter[1];
        }
       
        if(!(structCounter[0] + structCounter[1]))
        {
            ShowPlayerDialog(playerid,JDIALOGS+165,DIALOG_STYLE_MSGBOX,"{00FFE6}Online admins and vips","{FF0000}No admins nor VIPs online!" ,"OK","");
        }
        else
        {
            format(Jstring, 128, "{00FFE6}%d admins online, %d vips online",structCounter[0], structCounter[1]), SendClientMessage(playerid, 0xBADA55AA, "I agree with Misiur."), ShowPlayerDialog(playerid,JDIALOGS+165,DIALOG_STYLE_MSGBOX,Jstring,JLstring ,"OK","");
        }
        strdel(JLstring,0,500);
    }
}



Re: Integrate 2 Commands [Reps for help!!!] - Mahde - 06.02.2014

Quote:
Originally Posted by Misiur
Посмотреть сообщение
pawn Код:
CMD:admins(playerid,params[])
{
    new IsOnline = 0;

    strdel(JLstring,0,500);
   
    foreach(Player, i)
    {
        if (pInfo[i][pLevel] >= 1 && pInfo[i][AHide] == 0)
        {
            switch(pInfo[i][pLevel])
            {
                case 1: {
                    LevelName = ADMIN_LEVEL_1;
                    LevelColor = LEVEL_1_COLOR;
                }
                case 2: {
                    LevelName = ADMIN_LEVEL_2;
                    LevelColor = LEVEL_2_COLOR;
                }
                case 3: {
                    LevelName = ADMIN_LEVEL_4;
                    LevelColor = LEVEL_3_COLOR;
                }
                case 4: {
                    LevelName = ADMIN_LEVEL_3;
                    LevelColor = LEVEL_4_COLOR;
                }
                case 5: {
                    LevelName = ADMIN_LEVEL_5;
                    LevelColor = LEVEL_5_COLOR;
                }
                default: {
                    LevelName = ADMIN_LEVEL_6;
                    LevelColor = LEVEL_6_COLOR;
                }
            }
            if (IsPlayerAdmin(i)) format(Jstring, 128, "{FF0000}%s - Admin Level: %d (RCON Administrator)\n",GetName(i),pInfo[i][pLevel]);
            else format(Jstring, 128, "%s%s - Admin Level: %d (%s)\n",LevelColor,GetName(i),pInfo[i][pLevel],LevelName);
            strcat(JLstring, Jstring, sizeof(JLstring));
            IsOnline++;
        }
        else if (pInfo[i][Donator] >= 1)
        {
            switch(pInfo[i][Donator])
            {
                case 1:
                {
                    LevelName = VIP_LEVEL_1;
                    LevelColor = VIP_1_COLOR;
                }
                case 2:
                {
                    LevelName = VIP_LEVEL_2;
                    LevelColor = VIP_2_COLOR;
                }
                default:
                {
                    LevelName = VIP_LEVEL_3;
                    LevelColor = VIP_3_COLOR;
                }
            }
            format(Jstring, 128, "%s%s - VIP Level: %d (%s)\n",LevelColor,GetName(i),pInfo[i][Donator],LevelName);
            strcat(JLstring, Jstring, sizeof(JLstring));
            IsOnline++;
        }
    }
    if(!IsOnline) ShowPlayerDialog(playerid,JDIALOGS+165,DIALOG_STYLE_MSGBOX,"{00FFE6}Online admins and vips","{FF0000}No admins or vips are online!" ,"OK","");
    else
    {
        if(IsOnline == 1) ShowPlayerDialog(playerid,JDIALOGS+165,DIALOG_STYLE_MSGBOX,"{00FFE6}1 admin or vip online",JLstring ,"OK","");
        else format(Jstring, 128, "{00FFE6}%d admins and vips online",IsOnline), SendClientMessage(playerid, 0xBADA55AA, "If this message shows up, scripter is a lazy copy & paster"), ShowPlayerDialog(playerid,JDIALOGS+165,DIALOG_STYLE_MSGBOX,Jstring,JLstring ,"OK","");
    }
    strdel(JLstring,0,500);
    return 1;
}
SendClientMessage(playerid, 0xBADA55AA, "If this message shows up, scripter is a lazy copy & paster") :P
Thanks for both


Re: Integrate 2 Commands [Reps for help!!!] - Mahde - 06.02.2014

Thanks for help but i meant admins and vips in one dialog but not in same group like:

Admins:
%s - level %

Vips:
%s - Level %

-----------------

Sorry again


Re: Integrate 2 Commands [Reps for help!!!] - Misiur - 06.02.2014

Why won't you try yourself OP? We are here to help, so the more you show your effort, the more help you will get.

The @BullseyeHawk script will be now more useful than mine. Here's what you need: One big string to hold the final result visible in dialog. In the second if, don't operate on Jstring, but on some other string - you'll have now two strings, JLstring with all admins, and some other string with all vips. Finally concatenate those two strings, and voila - you have list of admins and vips.

Here's your base code (@BullseyeHawk's with bracket placement fix)
pawn Код:
CMD:admins( playerid, params[] )
{
    new
    structCounter[2],
    bool:declared[MAX_PLAYERS];
   
    strdel(JLstring, 0, 500);
   
    foreach(Player, i)
    {
        if(pInfo[i][pLevel] > 0 && !pInfo[i][aHide])
        {
            switch(pInfo[i][pLevel])
            {
                case 1:
                {
                    LevelName = ADMIN_LEVEL_1;
                    LevelColor = LEVEL_1_COLOR;
                }
                case 2:
                {
                    LevelName = ADMIN_LEVEL_2;
                    LevelColor = LEVEL_2_COLOR;
                }
                case 3:
                {
                    LevelName = ADMIN_LEVEL_3;
                    LevelColor = LEVEL_3_COLOR;
                }
                case 4:
                {
                    LevelName = ADMIN_LEVEL_4;
                    LevelColor = LEVEL_4_COLOR;
                }
                case 5:
                {
                    LevelName = ADMIN_LEVEL_5;
                    LevelColor = LEVEL_5_COLOR;
                }
                default:
                {
                    LevelName = ADMIN_LEVEL_6;
                    LevelColor = LEVEL_6_COLOR;
                }
            }
            if(IsPlayerAdmin(i))
            format(Jstring, 128, "{FF0000}%s - Level: %d (RCON Administrator)\n", GetName(i), pInfo[i][pLevel]);
            else
            format(Jstring, 128, "%s%s - Level: %d (%s)\n", LevelColor, GetName(i), pInfo[i][pLevel], LevelName);

            strcat(JLstring, Jstring, sizeof(JLstring));
            ++structCounter[0];
            declared[i] = true;
        }
        if(pInfo[i][Donator] > 0 && declared[i] == false)
        {
            switch(pInfo[i][Donator])
            {
                case 1:
                {
                    LevelName = VIP_LEVEL_1;
                    LevelColor = VIP_1_COLOR;
                }
                case 2:
                {
                    LevelName = VIP_LEVEL_2;
                    LevelColor = VIP_2_COLOR;
                }
                default:
                {
                    LevelName = VIP_LEVEL_3;
                    LevelColor = VIP_3_COLOR;
                }
            }
            format(Jstring, 128, "%s%s - VIP Level: %d (%s)\n", LevelColor, GetName(i), pInfo[i][Donator], LevelName);
            strcat(JLstring, Jstring, sizeof(JLstring));
            ++structCounter[1];
        }
    }
    if(!(structCounter[0] + structCounter[1]))
    {
        ShowPlayerDialog(playerid,JDIALOGS+165,DIALOG_STYLE_MSGBOX,"{00FFE6}Online admins and vips","{FF0000}No admins nor VIPs online!" ,"OK","");
    }
    else
    {
        format(Jstring, 128, "{00FFE6}%d admins online, %d vips online",structCounter[0], structCounter[1]), ShowPlayerDialog(playerid,JDIALOGS+165,DIALOG_STYLE_MSGBOX,Jstring,JLstring ,"OK","");
    }
    strdel(JLstring,0,500);
}



Re: Integrate 2 Commands [Reps for help!!!] - Mahde - 07.02.2014

Quote:
Originally Posted by Misiur
Посмотреть сообщение
Why won't you try yourself OP? We are here to help, so the more you show your effort, the more help you will get.

The @BullseyeHawk script will be now more useful than mine. Here's what you need: One big string to hold the final result visible in dialog. In the second if, don't operate on Jstring, but on some other string - you'll have now two strings, JLstring with all admins, and some other string with all vips. Finally concatenate those two strings, and voila - you have list of admins and vips.

Here's your base code (@BullseyeHawk's with bracket placement fix)
pawn Код:
CMD:admins( playerid, params[] )
{
    new
    structCounter[2],
    bool:declared[MAX_PLAYERS];
   
    strdel(JLstring, 0, 500);
   
    foreach(Player, i)
    {
        if(pInfo[i][pLevel] > 0 && !pInfo[i][aHide])
        {
            switch(pInfo[i][pLevel])
            {
                case 1:
                {
                    LevelName = ADMIN_LEVEL_1;
                    LevelColor = LEVEL_1_COLOR;
                }
                case 2:
                {
                    LevelName = ADMIN_LEVEL_2;
                    LevelColor = LEVEL_2_COLOR;
                }
                case 3:
                {
                    LevelName = ADMIN_LEVEL_3;
                    LevelColor = LEVEL_3_COLOR;
                }
                case 4:
                {
                    LevelName = ADMIN_LEVEL_4;
                    LevelColor = LEVEL_4_COLOR;
                }
                case 5:
                {
                    LevelName = ADMIN_LEVEL_5;
                    LevelColor = LEVEL_5_COLOR;
                }
                default:
                {
                    LevelName = ADMIN_LEVEL_6;
                    LevelColor = LEVEL_6_COLOR;
                }
            }
            if(IsPlayerAdmin(i))
            format(Jstring, 128, "{FF0000}%s - Level: %d (RCON Administrator)\n", GetName(i), pInfo[i][pLevel]);
            else
            format(Jstring, 128, "%s%s - Level: %d (%s)\n", LevelColor, GetName(i), pInfo[i][pLevel], LevelName);

            strcat(JLstring, Jstring, sizeof(JLstring));
            ++structCounter[0];
            declared[i] = true;
        }
        if(pInfo[i][Donator] > 0 && declared[i] == false)
        {
            switch(pInfo[i][Donator])
            {
                case 1:
                {
                    LevelName = VIP_LEVEL_1;
                    LevelColor = VIP_1_COLOR;
                }
                case 2:
                {
                    LevelName = VIP_LEVEL_2;
                    LevelColor = VIP_2_COLOR;
                }
                default:
                {
                    LevelName = VIP_LEVEL_3;
                    LevelColor = VIP_3_COLOR;
                }
            }
            format(Jstring, 128, "%s%s - VIP Level: %d (%s)\n", LevelColor, GetName(i), pInfo[i][Donator], LevelName);
            strcat(JLstring, Jstring, sizeof(JLstring));
            ++structCounter[1];
        }
    }
    if(!(structCounter[0] + structCounter[1]))
    {
        ShowPlayerDialog(playerid,JDIALOGS+165,DIALOG_STYLE_MSGBOX,"{00FFE6}Online admins and vips","{FF0000}No admins nor VIPs online!" ,"OK","");
    }
    else
    {
        format(Jstring, 128, "{00FFE6}%d admins online, %d vips online",structCounter[0], structCounter[1]), ShowPlayerDialog(playerid,JDIALOGS+165,DIALOG_STYLE_MSGBOX,Jstring,JLstring ,"OK","");
    }
    strdel(JLstring,0,500);
}
iv tried i dont have anyidea, but , what if you was vip and admin in the same time its will write admin only, thats why i was asking to show this result

Код:
%d admins online, %d vips online 

Administrators Online:
%s%s - Level: %d (%s)\n
.
.
.
VIPs Online:
%s%s - VIP Level: %d (%s)\n
.
.
(All This is one dialog ) Sorry i really dont know how to make this