[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
#2

this may/may not be the problem
pawn Код:
if(giveplayerid <= 0 DrugsAmount && giveplayerid >= 15000)// i believe that cant be blank where the zero is
Reply
#3

What's that 15000?
Reply
#4

You solved the problem man?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)