Marijuana Harvesting
#1

I have made this command:

pawn Код:
if(!strcmp(option, "harvest", true))
    {
   
        if(HarvestingPlant[playerid] == 0)
        {
            if(GetPlayerWeapon(playerid) != 4) return SendClientNotice(playerid, "Notice", "You need to have a~n~knife in order to harvest~n~marijuana plants.");

                for(new i = 0; i<MAX_WEED; i++)
                {
if(IsPlayerInRangeOfPoint(playerid, 1.5, Weed[i][wx], Weed[i][wy], Weed[i][wz]))
                        {
                    if(Weed[i][wState] == 2)
                    {
                        if(IsPlayerInRangeOfPoint(playerid, 1.5, Weed[i][wx], Weed[i][wy], Weed[i][wz]))
                       
                            Weed[i][wTimer] = SetTimerEx("Harvest", 1000, false, "d", playerid);
                            SendClientMessage(playerid, COLOR_WHITE, "> You are harvesting the plant.");
                            HarvestingPlant[playerid] = 1;
                            break;
                        }
                    }
                   
             }
               
        }
        else
        {
            SendClientMessage(playerid, COLOR_WHITE, "> You are already harvesting this plant.");
        }
    }

For some reason, it doesn't want to work at all, it doesn't call the public harvesting at all, any ideas?
Reply
#2

Use print statements before and after each if statement to see where it stops working.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)