CMD:ADMINS (VIPS)
#1

Hi!
I have 1 problem.
When I type /admins it shows me normal players too. (but it don't show RCON ADMINS)
And it shows admins too just RCON ADMIN isn't shown.

And with the VIPS it show me the normal players too.
Please someone fix that code Please!

Код:
CMD:admins(playerid, params[])
{
new Rank[71];
new string[556];
new fstring[556];
new count = 0;
foreach (new i : Player)
{
if(PlayerInfo[i][AdminLevel] > 5)
{
Rank = #Lvl5;
}
if(IsPlayerAdmin(i))
{
Rank = #RCON;
}
else
{
switch(PlayerInfo[i][AdminLevel])
{
case 1: Rank = #Lvl1;
case 2: Rank = #Lvl2;
case 3: Rank = #Lvl3;
case 4: Rank = #Lvl4;
case 5: Rank = #Lvl5;
}

count++;
format(fstring, sizeof(fstring), "{FFFFFF}%s(ID:%d) {44FF00}[Rank: %s - %i]\n", PlayerName(i), i, Rank, PlayerInfo[i][AdminLevel]);
strcat(string, fstring, 556);
}

if(count == 0) return ShowPlayerDialog(playerid, DIALOG_Admins, DIALOG_STYLE_MSGBOX, "{44FF00}Online {FFFFFF}Admins", "{FF0000}There is no current admins online!", "Okay", "");
else
{
format(fstring, sizeof(fstring), "\r\n\n\n\n\n{FFFFFF}Total Admins: %d", count);
strcat(string, fstring, 556);
ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_MSGBOX, "{44FF00}Online {FFFFFF}Admins", string, "Okay", "");
}
if (count == 0) SendClientMessage(playerid, COLOR_RED, "No admin online in the list\n{FFFFFF} _______________________________________");
}
return 1;
}

Код:
CMD:vips(playerid, params[])
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
new VRank[71];
new string[556];
new fstring[556];
new count = 0;
foreach (new i : Player)
{
switch(PlayerInfo[playerid][VIP])
{
case 1: VRank = #Vip1;
case 2: VRank = #Vip2;
}
if(PlayerInfo[playerid][VIP] >= 3) VRank = #Vip3;

count++;
format(fstring, sizeof(fstring), "{FFFFFF}%s(ID:%d) {44FF00}[Rank: %s - %i]\n", PlayerName(i), i, VRank, PlayerInfo[i][VIP]);
strcat(string, fstring, 556);
}
if(count == 0) return ShowPlayerDialog(playerid, DIALOG_Vips, DIALOG_STYLE_MSGBOX, "{44FF00}Online {FFFFFF}Vips", "{FF0000}There is no current vips online!", "Okay", "");
else
{
format(fstring, sizeof(fstring), "\r\n\n\n\n\n{FFFFFF}Total Vips: %d", count);
strcat(string, fstring, 556);
ShowPlayerDialog(playerid, DIALOG_VIPS, DIALOG_STYLE_MSGBOX, "{44FF00}Online {FFFFFF}Vips", string, "Okay", "");
}
if (count == 0) SendClientMessage(playerid, COLOR_RED, "No vip online in the list\n{FFFFFF} _______________________________________");

return 1;
}
Reply
#2

Please anyone?
Reply
#3



pawn Код:
CMD:admins(playerid, params[])
{
    new count_admins = 0, string[500], fstring[100];

    foreach(new i: Player)
    {
        if(IsPlayerConnected(i))
        {
            if(PlayerInfo[i][AdminLevel] >= 1)
            {
                switch(PlayerInfo[i][AdminLevel])
                {
                    case 1: rank = "level 1";
                    case 2: rank = "level 2";
                    case 3: rank = "level 3";
                    case 4: rank = "level 4";
                    case 5: rank = "level 5";
                }
                count_admins++;
            }
            if(IsPlayerAdmin(i))
            {
                count_admins++;
                rank = "rcon";
            }
            strdel(fstring, 0, 100);
            format(fstring, sizeof(fstring), "{FFFFFF}%s(ID:%d) {44FF00}[Rank: %s]\n", PlayerName(i), i, rank);
            strcat(string, fstring);

            if(count_admins != 0)
            {
                format(fstring, sizeof(fstring), "\r\n\n\n\n\n{FFFFFF}Total Admins: %d", count);
                strcat(string, fstring, 556);
                ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_MSGBOX, "{44FF00}Online {FFFFFF}Admins", string, "Okay", "");
            }
            else if(count_admins == 0)
            {
                ShowPlayerDialog(playerid, DIALOG_Admins, DIALOG_STYLE_MSGBOX, "{44FF00}Online {FFFFFF}Admins", "{FF0000}There is no current admins online!", "Okay", "");
            }
        }
    }
    return true;
}
Reply
#4

Man... you forget a define :
Код:
#define DIALOG_ADMINS
Reply
#5

Hahhaha what a thread bumping
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)