[HELP] Harvestable Pumpkins/Plants

Darthmard

Member
I have put Pumpkins in crafting system on server issue is players are unable to harvest them even after restart items names are MAP_pumpkin2 and MAP_pumpkin. The problem is that the harvesting doesn't show for players it only works for servers pumpkin spawns not players. If anybody know of a script that will fix this it would be greatly appreciated.
 
I found a solution to problem if you need just edit this some code needs checking

add this to custom ExtraRc
Code:
    class ItemMachete {
class farmpumpk {
text = "Harvest Pumpkin";
script = "execVM 'custom\pumpkin.sqf'";
};
};




make pumpkin.sqf add
Code:
_countpumpk = count nearestObjects [player, ["MAP_pumpkin"], 5];
if (_countpumpk > 0) then {
cutText [format["Harvesting..."], "PLAIN DOWN"];
player removeWeapon "ItemMachete";
player playActionNow "Medic";
sleep 5;
player addMagazine "Foodpumpkin";
player addWeapon "ItemMachete";
cutText [format["Finished harvesting! , Pumpkin has been added in your inventory!"], "PLAIN DOWN"];
} else {
cutText [format["You are not close enough to Pumpkins!"], "PLAIN DOWN"];
};

if want to crush Pumpkins so can't re harvest try (not tested it)
Code:
_countpumpk = count nearestObjects [player, ["MAP_pumpkin"], 5];
if (_countpumpk > 0) then {
cutText [format["Harvesting..."], "PLAIN DOWN"];
player removeWeapon "ItemMachete";
player playActionNow "Medic";
sleep 5;
player addMagazine "Foodpumpkin";
player addWeapon "ItemMachete";
cutText [format["Finished harvesting! , Pumpkin has been added in your inventory!"], "PLAIN DOWN"];
_countpumpk setDamage 1;
} else {
cutText [format["You are not close enough to Pumpkins!"], "PLAIN DOWN"];
};

Hope I helped someone else :)
 
Back
Top