Jump to content

[1.6 Harvestable hemp, smoking weed, pot farms]


juandayz

Recommended Posts

Update for deploy anything if you don´t like macca or just not using the extra_rc script:

// be sure to have a komma on the lines that come before  
	["ItemKnife","Harvest the weed","execVM 'drugs\cuthemp.sqf';","true"],
    ["ItemKiloHemp","Smoke that shit","execVM 'drugs\smoke.sqf';","true"],
	["ItemMachete","Harvest the weed","execVM 'drugs\cuthemp.sqf';","true"] // no komma after last line

@juandayz it should work, have yet to have tested it though

Link to comment
Share on other sites

  On 3/22/2017 at 8:39 PM, Jestertriks said:

What would cause when I try to harvest the plant. no matter where I stand it keeps saying you need to be close to a plant to harvest. I used click options, all my file paths are correct. smoke weed is working, I just can not harvest the plants

 

thanks guys

 

Expand  

hers the part where the nearest restriction is defined

_playerPos = getPosATL player;//get player pos
_nearWeed = count nearestObjects [_playerPos, ["fiberplant"], 4] > 0;//set player pos from fiberplant almost 4mts of distance

//if is not close exit from the script
if !(_nearWeed) exitWith {
 systemChat("Needs be near of a FiberPlant");
};

i cannot see nothing wrong

Link to comment
Share on other sites

what I downloaded from your link looks different. would that make a difference?

 

private ["_vehicle","_inVehicle","_countplayers","_gearmenu","_playerPos","_nearWeed","_weed","_objectID","_objectUID"];
_playerPos = getPosATL player;
_hempqty = {_x == "ItemKiloHemp"} count magazines player;
_nearWeed = count nearestObjects [_playerPos, ["fiberplant"], 4] > 0;
_weed = nearestObject [player, "fiberplant"];

if !(_nearWeed) exitWith {
 systemChat("Needs be near of a FiberPlant");

Link to comment
Share on other sites

  On 3/22/2017 at 9:12 PM, Jestertriks said:

what I downloaded from your link looks different. would that make a difference?

 

private ["_vehicle","_inVehicle","_countplayers","_gearmenu","_playerPos","_nearWeed","_weed","_objectID","_objectUID"];
_playerPos = getPosATL player;
_hempqty = {_x == "ItemKiloHemp"} count magazines player;
_nearWeed = count nearestObjects [_playerPos, ["fiberplant"], 4] > 0;
_weed = nearestObject [player, "fiberplant"];

if !(_nearWeed) exitWith {
 systemChat("Needs be near of a FiberPlant");

Expand  

nop its the same.. i just remove the lines in the post to show you exactly.. see lines in black

  Reveal hidden contents

 

Link to comment
Share on other sites

@Jestertriks  anywy try this without all restrictions

private ["_playerPos","_nearWeed","_weed"];
_playerPos = getPosATL player;
_nearWeed = count nearestObjects [_playerPos, ["fiberplant"], 4] > 0;
_weed = nearestObject [player, "fiberplant"];


CloseDisplay 106;

if !(_nearWeed) exitWith {
 systemChat("Needs be near of a FiberPlant");
}else{

	player playActionNow "Medic";
	sleep 1;

	deleteVehicle _weed;

	player addMagazine "ItemKiloHemp";
	sleep 1;
	 systemChat("NICE LETS SMOKE OR SELL");
};

 

Link to comment
Share on other sites

  On 3/23/2017 at 12:19 AM, Jestertriks said:

http://steamcommunity.com/sharedfiles/filedetails/?id=889219278

 

yea idk. its weird. I'm sure its working for you guys but I installed it exactly like instructed

Expand  

this is what i have and it works great

  Reveal hidden contents

 

Link to comment
Share on other sites

  On 3/23/2017 at 1:14 AM, Jestertriks said:

would you mind sharing your dayz_server/modules/weedfarm.sqf? Maybe the one I downloaded is bad

Expand  
  Reveal hidden contents

 I also have mine mission sided, called from the init. not sure if that makes a difference

Link to comment
Share on other sites

@Jestertriks a lil test to see if your problem is the event.

we gonna plant manually the fiberplant ok?

if u have deploy anything use step 1.

if u use extra_Rc.hpp use step 2.

if u doont have any right click mod.. the n use step 3

STEP 1 (DEPLOY ANYTHING)-add this line in \MPMissions\DayZ_Epoch_11.Chernarus\addons\bike\config.sqf

  Reveal hidden contents

STEP 2 (EXTRA_RC)-create plantmanually.sqf (mpmissions\your instance\drugs\)

  Reveal hidden contents

open your extra_rc.hpp and paste:

  Reveal hidden contents

 

STEP 3 (launch the event throug init.sqf)

create weed.sqf (mpmissions\your instance\)

  Reveal hidden contents

 

Open init.sqf and find:

call compile preprocessFileLineNumbers "\z\addons\dayz_server\system\server_monitor.sqf";

bellow paste:

//weed
_weed = [] execVM "weed.sqf";
//

 

 

now go in game , right click on etool , plant  and try to cut the hemp with the knife or machete

Link to comment
Share on other sites

  On 3/24/2017 at 3:18 AM, Jestertriks said:

Ok so its not the event. got the same response from planting my self.

 

I also deleted the deploy way and installed the extra_rc way and still got the same response wtf lol

Expand  

ok gonna try something diferent

forgot the right click actions.. gona use and translate the nearest restriction to fn_selfactions.  to try the script with scroll menu option.. ok?

replace the cuthemp.sqf by this:   (drop it into mpmissions\instance_11.chernarus\drugs\ )

  Reveal hidden contents

open your CUSTOM fn_Selfactions.sqf

at very botom paste:

  Reveal hidden contents

 

Link to comment
Share on other sites

  On 3/24/2017 at 5:27 PM, Hooty said:

no but i get that if say i already have the limit in my inventory when i re try to havest

Expand  

try replace the cutehemp.sqf with this

  Reveal hidden contents

 

Link to comment
Share on other sites

  On 3/24/2017 at 6:33 PM, Jestertriks said:

@juandayz Yes sir, the fn_selfactions worked. when at the plants it said "cut plant" and it worked.

non spawned in plants. used your adminevents and started a weedfarm

right click knife still did not work

Expand  

well if u see in the code of fn_Selfactions.sqf and in the cuthemp  the restrictions lines are the sames... cannot understand why it dsnt work ...

but try it... again back to use right clicks.

and replace cutehemp by this

  Reveal hidden contents

 

 

Link to comment
Share on other sites

  On 3/24/2017 at 9:07 PM, Jestertriks said:

ok it is working now, I'm guessing that cuthemp script? IDK but thank you for taking the time to help

Expand  

lines in black to see the changes

if !(_nearWeed) exitWith {
dayz_actionInProgress = false;
 systemChat("Needs be near of a FiberPlant");
};

seems like your old cutehemp do not get out of the first action in progress... i guess

Link to comment
Share on other sites

Fixed mine i replaced cuthemp.sqf with this

  Reveal hidden contents

I removed the waiting for harvest to finish , made it cut instant "no medic action", set hempqty<0, and made it give 2 kilos since you have to store after each harvest. This also prevented all dupes on 1.0.5.1 and seems to on 1.0.6.1 including auto clickers.

***I use click actions method***

Link to comment
Share on other sites

  • 5 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...