Hey, i working on deployable drug plants. Using right click on a shovel. and using the old deploy bike script.
The plant spawn fine. but when i extract the drug, this plant explote. and kill me:)
heres the drug.sqf
if (false) then {
cutText [format["You are in combat and cannot plant marihuana."], "PLAIN DOWN"];
} else {
player playActionNow "Medic";
r_interrupt = false;
_dis=10;
_sfx = "repair";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
sleep 6;
_object = "fiberplant" createVehicle (position player);
_object setVariable ["ObjectID", "1", true];
_object setVariable ["ObjectUID", "1", true];
player reveal _object;
cutText [format["You've used your shovel to plant a herb! enjoy!"], "PLAIN DOWN"];
r_interrupt = false;
player switchMove "";
player playActionNow "stop";
sleep 10;
cutText [format["Warning: Spawned herbs DO NOT SAVE after server restart!"], "PLAIN DOWN"];
};
and the call for extra_rc.hpp (this work fine)
class ItemKnife {
class farmhemp {
text = "take drugs";
script = "execVM 'custom\script\hemp.sqf'";
};
};
class ItemKiloHemp {
class smokeweed {
text = "smoke";
script = "execVM 'custom\script\smokeshit.sqf'";
};
};
class ItemShovel {
class smokeweed {
text = "Plant drug";
script = "execVM 'custom\script\drug.sqf'";
};
};
};
and i put "fiberplant" into variables.sqf in section: dayz_allowedObjects = []