4 errors 1 line
#7

because it don't know dcmd function...
add this at the top of the script

pawn Код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1

and under
OnPlayerCommanText(playerid,params[])
{
         dcmd(admins,5,cmdtext);
    return 1;
}
if he will use your codew ( will give errors)..but fine...

and add this out of a callback
pawn Код:
dcmd_admins(playerid, params[])
{
    new strtext[1000],playern[MAX_PLAYER_NAME],string[129];
    if(IsPlayerConnected(playerid))
    {
        SendClientMessage(playerid, COLOR_GREEN, ".::Admins OnLine::.");
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                if(PlayerInfo[i][ pAdmin ] >= 1)
                {
                            GetPlayerName(i, playern, sizeof(playern));
                    format(string, 128, "*[Junior Admin] %s [ID: %d]", playern, i);//, i, PlayerInfo[i][pAdmin]
                    //SendClientMessage(playerid, 0x99CCCCAA, string)
                }
                if(PlayerInfo[i][ pAdmin ] >= 2)
                {
                    GetPlayerName(i, playern, sizeof(playern));
                    format(string, 128, "*[General Admin] %s [ID: %d]", playern, i);//, i, PlayerInfo[i][pAdmin]
                    //SendClientMessage(playerid, 0x99FFCCAA, string);
                }
                if(PlayerInfo[i[ pAdmin ] >= 3)
                {
                    GetPlayerName(i, playern, sizeof(playern));
                    format(string, 128, "*[Senior Admin] %s [ID: %d]", playern, i);//, i, PlayerInfo[i][pAdmin]
                    //SendClientMessage(playerid, 0x99FFCCAA, string);
                }
                if(PlayerInfo[i][ pAdmin ] >= 4)
                {
                    GetPlayerName(i, playern, sizeof(playern));
                    format(string, 128, "*[Head Admin] %s [ID: %d]", playern, i);//, i, PlayerInfo[i][pAdmin]
                    //SendClientMessage(playerid, 0x008D04FF, string);
                }
                if(PlayerInfo[i][ pAdmin ] >= 5)
                {
                    GetPlayerName(i, playern, sizeof(playern));
                    format(string, 128, "*[[Server Manager] %s [ID: %d]", playern, i);//, i, PlayerInfo[i][pAdmin]
                    //SendClientMessage(playerid, 0x006CA2FF, string);
                }
                if(PlayerInfo[i][pAdmin] == 6)
                {
                    GetPlayerName(i, playern, sizeof(playern));
                    format(string, 128, "*[Co-Executive Admin] %s [ID: %d]", playern, i);//, i, PlayerInfo[i][pAdmin]
                    //SendClientMessage(playerid, 0x006CA2FF, string);
                }
                if(PlayerInfo[i][ pAdmin ] >= 7)
                {
                    GetPlayerName(i, playern, sizeof(playern));
                    format(string, 128, "*[Executive Admin] %s [ID: %d]", playern, i);//, i, PlayerInfo[i][pAdmin]
                    //SendClientMessage(playerid, 0x794040FF, string);
                }
                strcat(string, "\n");
                strcat(strtext, string);
            }
        }
        ShowPlayerDialog(playerid, 0xF, DIALOG_STYLE_MSGBOX,"~ Admins ~", strtext, "Ok",#);
    }
    return 1;
}
but not above of OnPlayerCommandText

like this
pawn Код:
#include <a_samp>
 
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1


   public OnPlayerCommandText(playerid,cmdtext[])
  {
        //your code...
              dcmd(admins,5,cmdtext);
         return 1;
  }

   dcmd_admins(playerid, params[])
{
    new strtext[1000],playern[MAX_PLAYER_NAME],string[129];
    if(IsPlayerConnected(playerid))
    {
        SendClientMessage(playerid, COLOR_GREEN, ".::Admins OnLine::.");
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                if(PlayerInfo[i][ pAdmin ] >= 1)
                {
                            GetPlayerName(i, playern, sizeof(playern));
                    format(string, 128, "*[Junior Admin] %s [ID: %d]", playern, i);//, i, PlayerInfo[i][pAdmin]
                    //SendClientMessage(playerid, 0x99CCCCAA, string)
                }
                if(PlayerInfo[i][ pAdmin ] >= 2)
                {
                    GetPlayerName(i, playern, sizeof(playern));
                    format(string, 128, "*[General Admin] %s [ID: %d]", playern, i);//, i, PlayerInfo[i][pAdmin]
                    //SendClientMessage(playerid, 0x99FFCCAA, string);
                }
                if(PlayerInfo[i[ pAdmin ] >= 3)
                {
                    GetPlayerName(i, playern, sizeof(playern));
                    format(string, 128, "*[Senior Admin] %s [ID: %d]", playern, i);//, i, PlayerInfo[i][pAdmin]
                    //SendClientMessage(playerid, 0x99FFCCAA, string);
                }
                if(PlayerInfo[i][ pAdmin ] >= 4)
                {
                    GetPlayerName(i, playern, sizeof(playern));
                    format(string, 128, "*[Head Admin] %s [ID: %d]", playern, i);//, i, PlayerInfo[i][pAdmin]
                    //SendClientMessage(playerid, 0x008D04FF, string);
                }
                if(PlayerInfo[i][ pAdmin ] >= 5)
                {
                    GetPlayerName(i, playern, sizeof(playern));
                    format(string, 128, "*[[Server Manager] %s [ID: %d]", playern, i);//, i, PlayerInfo[i][pAdmin]
                    //SendClientMessage(playerid, 0x006CA2FF, string);
                }
                if(PlayerInfo[i][pAdmin] == 6)
                {
                    GetPlayerName(i, playern, sizeof(playern));
                    format(string, 128, "*[Co-Executive Admin] %s [ID: %d]", playern, i);//, i, PlayerInfo[i][pAdmin]
                    //SendClientMessage(playerid, 0x006CA2FF, string);
                }
                if(PlayerInfo[i][ pAdmin ] >= 7)
                {
                    GetPlayerName(i, playern, sizeof(playern));
                    format(string, 128, "*[Executive Admin] %s [ID: %d]", playern, i);//, i, PlayerInfo[i][pAdmin]
                    //SendClientMessage(playerid, 0x794040FF, string);
                }
                strcat(string, "\n");
                strcat(strtext, string);
            }
        }
        ShowPlayerDialog(playerid, 0xF, DIALOG_STYLE_MSGBOX,"~ Admins ~", strtext, "Ok",#);
    }
    return 1;
}
in this case will give errors for me ( script) because don't know the PlayerInfo[i][pAdmin] function but for you will not give errors if try this..
Reply


Messages In This Thread
4 errors 1 line - by Pro_Scriptor - 23.07.2012, 07:06
Re: 4 errors 1 line - by Kindred - 23.07.2012, 07:08
Re: 4 errors 1 line - by Pro_Scriptor - 23.07.2012, 07:11
Re: 4 errors 1 line - by XStormiest - 23.07.2012, 07:41
Re: 4 errors 1 line - by Pro_Scriptor - 23.07.2012, 07:46
Re: 4 errors 1 line - by Revo - 23.07.2012, 07:48
Re: 4 errors 1 line - by XStormiest - 23.07.2012, 07:50
Re: 4 errors 1 line - by Pro_Scriptor - 23.07.2012, 08:20
Re: 4 errors 1 line - by XStormiest - 23.07.2012, 08:21
Re: 4 errors 1 line - by Pro_Scriptor - 23.07.2012, 08:30

Forum Jump:


Users browsing this thread: 1 Guest(s)