ZCMD /admins command
#1

In this code:

pawn Код:
CMD:admins(playerid, params[])
{
    new online, string[128], file[32];
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(PlayerInfo[playerid][pAdmin] < 5)
    {
        foreach(Player, i)
        {
            if(PlayerInfo[i][pAdmin] && aDuty[i])
            {
                online ++;
            }
        }
        format(string, sizeof(string), "<> --- Administrators --- <>");
        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
        foreach(Player, i)
        {
            if(PlayerInfo[i][pAdmin] && aDuty[i])
            {
                format(string, sizeof(string), "- %s %s", RPALN(i), RPN(i));
                SendClientMessage(playerid, COLOR_IRC, string);
            }
        }
    }
    else
    {
        foreach(Player, i)
        {
            if(PlayerInfo[i][pAdmin])
            {
                online ++;
            }
        }
        format(string, sizeof(string), "<> --- Administrators --- <>");
        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
        foreach(Player, i)
        {
            if(PlayerInfo[i][pAdmin])
            {
                if(!aDuty[i])
                {
                    format(file, sizeof(file), "users/%s.ini",RPNU(i));
                    format(string, sizeof(string), "- %s %s", RPALN(i), RPN(i));
                }
                else
                {
                    format(file, sizeof(file), "users/%s.ini",RPNU(i));
                    format(string, sizeof(string), "- %s %s", RPALN(i), RPN(i));
                }
                if(PlayerInfo[i][pGangMod]) strcat(string, " [Gang Mod]");
                SendClientMessage(playerid, COLOR_IRC, string);
            }
        }
    }
    if(PlayerInfo[i][pHelper])
        {
            online ++;
        }
    format(string, sizeof(string), "<> --- Helpers --- <>");
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    foreach(Player, i)
    {
        if(PlayerInfo[i][pHelper])
        {
            format(string, sizeof(string), "- %s %s", RPHLN(i), RPN(i));
            SendClientMessage(playerid, COLOR_IRC, string);
        }
    }
    return 1;
}
I get this error:

Quote:

C:\Users\Fiore\Desktop\zGaming GM\zGaming RP\gamemodes\ZRP.pwn(8755) : error 017: undefined symbol "i"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

This is the line error:

Quote:
if(PlayerInfo[i][pHelper])
Reply


Messages In This Thread
ZCMD /admins command - by Fiore - 22.10.2012, 20:03
Re: ZCMD /admins command - by SchurmanCQC - 22.10.2012, 20:05
Re: ZCMD /admins command - by WizBoy - 22.10.2012, 20:05
Re: ZCMD /admins command - by Red_Dragon. - 22.10.2012, 20:07
Re: ZCMD /admins command - by Fiore - 22.10.2012, 20:08
Re: ZCMD /admins command - by Alex Magaсa - 22.10.2012, 20:11
Re : ZCMD /admins command - by yusei - 22.10.2012, 20:13
Re: ZCMD /admins command - by Fiore - 22.10.2012, 20:17
Re : ZCMD /admins command - by yusei - 22.10.2012, 20:49

Forum Jump:


Users browsing this thread: 1 Guest(s)