Which hook for picking up plants?Solved
2CHEVSKII
OnCropGather
Oh i must be blind one more question how can you make it that it will only use certain plant? Im kinda new to this stuff.
CrazyBeastOh i must be blind one more question how can you make it that it will only use certain plant? Im kinda new to this stuff.
Check by shortname
Orange
Check by shortname
do you mean like this
object OnCropGather(PlantEntity plant, Item item, BasePlayer player)
{
if (plant.info.shortname != "corn-collectable") return;There really aint that much information about checking shortnames etc. Could you hook me up with some sources or example?
CrazyBeastdo you mean like this
object OnCropGather(PlantEntity plant, Item item, BasePlayer player) { if (plant.info.shortname != "corn-collectable") return;There really aint that much information about checking shortnames etc. Could you hook me up with some sources or example?
I can recommend you to start with C# basics and installing IDE + Decompiler. Right here you are trying to get shortname from BaseEntity, that doesnt have that parameter
Orange
I can recommend you to start with C# basics and installing IDE + Decompiler. Right here you are trying to get shortname from BaseEntity, that doesnt have that parameter
Oh yea true i gotta do some more research thanks :)