LITTE HELP [LuxAdmin]
#1

I Need Some Help With LuxAdmin System

With /Admins I Need It in Dialog Msg Box
SomeOne Make It On Dialog Msg Box But When some one type /admins and 2 or 3 admin Onlince
But On Msg Box Showing Only One 1 Admin



Only 1 Admin Name Showing ? ? Not More's Why
Reply
#2

Can we see code for it?
Reply
#3

Here Is THe Code

Код:
dcmd_admins(playerid,params[])
{
    #pragma unused params
    new
        count = 0,
        string[128];
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if (IsPlayerConnected(i)) {
            if(AccInfo[i][Level] >= 1 && AccInfo[i][Hide] == 0) {
                if(AccInfo[i][Level] > 6) {
                    AdmRank = "[FOUNDER]";
                }
                if(IsPlayerAdmin(i)) AdmRank ="[RCON ADMIN]";
                else
                switch(AccInfo[i][Level]) {
                    case 1: AdmRank = "{EBE710}[CO-MODERATOR]";
                    case 2: AdmRank = "{2E10EB}[MODERATOR]";
                    case 3: AdmRank = "{10EB23}[ADMIN]";
                    case 4: AdmRank = "{EB105D}[LEADER]";
                    case 5: AdmRank = "{EB1F10}[MANAGEMENT]";
                    case 6: AdmRank = "{EB1F10}[FOUNDER]";
                }
                format(string, 128, "{B3C924}%s [ID:%i] | Level: %d - %s",PlayerName2(i),i,AccInfo[i][Level], AdmRank);
                ShowPlayerDialog(playerid, 500, DIALOG_STYLE_MSGBOX, "{AA3333}___________|- ONLINE ADMINS -|__________", string, "Close", "");
                count++;
            }
        }
    }
    if (count == 0)
        ShowPlayerDialog(playerid, 500, DIALOG_STYLE_MSGBOX, "{AA3333}_________|- ONLINE ADMINS -|___________", "{AA3333}NO ADMINS ONLINE\n{33AA33} ____________", "Close", "");
    return 1;
}
Reply
#4

pawn Код:
dcmd_admins(playerid,params[])
{
    #pragma unused params
    new
        count = 0,
        string[128];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if (IsPlayerConnected(i))
        {
            if(AccInfo[i][Level] >= 1 && AccInfo[i][Hide] == 0)
            {
                if(IsPlayerAdmin(i)) AdmRank ="[RCON ADMIN]";
                else
                {
                    switch(AccInfo[i][Level])
                    {
                        case 1: AdmRank = "{EBE710}[CO-MODERATOR]";
                        case 2: AdmRank = "{2E10EB}[MODERATOR]";
                        case 3: AdmRank = "{10EB23}[ADMIN]";
                        case 4: AdmRank = "{EB105D}[LEADER]";
                        case 5: AdmRank = "{EB1F10}[MANAGEMENT]";
                        case 6: AdmRank = "{EB1F10}[FOUNDER]";
                        default: AdmRank = "[FOUNDER]";//Default means all the other
                        //unmentioned case. Since you have checked the player's level
                        //is larger than 1, this means he must be a founder
                        //(unless you have negative level).
                    }
                }
                format(string, 128, "%s{B3C924}%s [ID:%i] | Level: %d - %s\n", string, PlayerName2(i), i, AccInfo[i][Level], AdmRank);
                //We are appending the string, so put %s before any new data is added,
                //and that parameter actually refers to the string itself.
                count++;
            }
        }
    }
    if (count == 0) ShowPlayerDialog(playerid, 500, DIALOG_STYLE_MSGBOX, "{AA3333}_________|- ONLINE ADMINS -|___________", "{AA3333}NO ADMINS ONLINE\n{33AA33} ____________", "Close", "");
    else ShowPlayerDialog(playerid, 500, DIALOG_STYLE_MSGBOX, "{AA3333}___________|- ONLINE ADMINS -|__________", string, "Close", "");
    //Don't show dialog in a loop, it won't show all the admins continuously.
    //Show it after all the data are ready.
    return 1;
}
Reply
#5

luke shut up. But I can't help you.. sorry lol im a beginner. i haven't been scripting 9 months maybe more :S
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)