Integrate 2 Commands [Reps for help!!!]
#2

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;
}
Reply


Messages In This Thread
Integrate 2 Commands [Reps for help!!!] - by Mahde - 06.02.2014, 10:31
Re: Integrate 2 Commands [Reps for help!!!] - by Misiur - 06.02.2014, 11:09
Re: Integrate 2 Commands [Reps for help!!!] - by BullseyeHawk - 06.02.2014, 11:42
Re: Integrate 2 Commands [Reps for help!!!] - by Misiur - 06.02.2014, 11:51
Re: Integrate 2 Commands [Reps for help!!!] - by BullseyeHawk - 06.02.2014, 11:54
Re: Integrate 2 Commands [Reps for help!!!] - by Mahde - 06.02.2014, 12:09
Re: Integrate 2 Commands [Reps for help!!!] - by Mahde - 06.02.2014, 12:15
Re: Integrate 2 Commands [Reps for help!!!] - by Misiur - 06.02.2014, 13:50
Re: Integrate 2 Commands [Reps for help!!!] - by Mahde - 07.02.2014, 06:50

Forum Jump:


Users browsing this thread: 2 Guest(s)