[HELP]Deposit drugs
#1

I made a command :
pawn Код:
if(strcmp(cmd, "/depositdrugs", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_GREY, "USAGE: /deposit [amount]");
            return 1;
        }
        giveplayerid = strval(tmp);
        if (PlayerToPoint(8, playerid,364.1431,173.7478,1008.3828))
        {
            if(giveplayerid <= DrugsAmount && giveplayerid >= 0)
         {
                format(string, sizeof(string), "You have deposited %d$ into your drug store.",giveplayerid);
                SendClientMessage(playerid, COLOR_GREEN, string);
                GivePlayerMoney(playerid, -giveplayerid);
                PlayerInfo[playerid][pDrugs] = PlayerInfo[playerid][pDrugs]+giveplayerid;
                DrugsAmount[playerid] = 0;
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED,"You do not have that drugs in your pocket.");
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_RED,"You must be at the drug store to do this command.");
        }
        return 1;
    }
But it gives me the error :
pawn Код:
D:\Games\GTA San Andreas\server\gamemodes\slrpg.pwn(9349) : error 033: array must be indexed (variable "DrugsAmount")
I want if that player is in that point to deposit their drugs they're carring
Reply


Messages In This Thread
[HELP]Deposit drugs - by [Aka]Dragonu - 06.12.2010, 14:36
Re: [HELP]Deposit drugs - by fangoth1 - 06.12.2010, 14:49
Re: [HELP]Deposit drugs - by [Aka]Dragonu - 06.12.2010, 16:26
Re: [HELP]Deposit drugs - by MiXtap3 - 08.01.2011, 13:56

Forum Jump:


Users browsing this thread: 1 Guest(s)