Cant be placed

Messages
25
Likes
1
Points
3
Hi everyone,

first i want say iam learning that, i used befor some vb.net and make some stuff but now want start with new programation language and make some basic ( i think) plugin, after that ...

i want make a plugin to desable the placement of structure on direct on ground, so can only be placed on structures...

so after look for some codes i download that hook aplication and start looking for something i think is that :\

my first option is


C++:
DECLARE_HOOK(APrimalStructure_DestroyStructuresPlacedOnFloor, void, APrimalStructure*);


void  Hook_APrimalStructure_DestroyStructuresPlacedOnFloor(APrimalStructure* _this)
{
    APrimalStructure_DestroyStructuresPlacedOnFloor_original(_this);
}

ArkApi::GetHooks().SetHook("APrimalStructure.DestroyStructuresPlacedOnFloor", &Hook_APrimalStructure_DestroyStructuresPlacedOnFloor, &APrimalStructure_DestroyStructuresPlacedOnFloor_original);

ArkApi::GetHooks().DisableHook("APrimalStructure.DestroyStructuresPlacedOnFloor", &Hook_APrimalStructure_DestroyStructuresPlacedOnFloor);
but after start thinking and destroy is not the best option so continue looking and find that one


C++:
DECLARE_HOOK(APrimalStructure_BPPreventPlacingOnFloorStructure, bool, APrimalStructure*, FPlacementData *, APrimalStructure *);

bool  Hook_APrimalStructure_BPPreventPlacingOnFloorStructure(APrimalStructure* _this, FPlacementData* theOutPlacementData, APrimalStructure* FloorStructure)
{
    return APrimalStructure_BPPreventPlacingOnFloorStructure_original(_this, theOutPlacementData, FloorStructure);
}

ArkApi::GetHooks().SetHook("APrimalStructure.BPPreventPlacingOnFloorStructure", &Hook_APrimalStructure_BPPreventPlacingOnFloorStructure, &APrimalStructure_BPPreventPlacingOnFloorStructure_original);

ArkApi::GetHooks().DisableHook("APrimalStructure.BPPreventPlacingOnFloorStructure", &Hook_APrimalStructure_BPPreventPlacingOnFloorStructure);
think that one is more what i want but the problem is i get some erros, and dont know what do more :\

thanks for anny help
 
Advertisement

Monetise Your Game Server

Want to monetise your ARK Server? Create your own webstore at tebex.io

Top