SA-MP Forums Archive
Marijuana Harvesting - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Marijuana Harvesting (/showthread.php?tid=417622)



Marijuana Harvesting - Abreezy - 21.02.2013

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?


Re: Marijuana Harvesting - Scenario - 22.02.2013

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