- Joined
- Oct 30, 2019
- Messages
- 17
C++:
bool Hook_APrimalStructure_Die(APrimalStructure* _this, float KillingDamage, FDamageEvent* DamageEvent, AController* Killer, AActor* DamageCauser)
{
int structureTeamId = _this->TargetingTeamField();
if (structureTeamId != 0) // tribe
{
if (Killer && Killer->IsA(APlayerController::StaticClass())) {
AShooterPlayerController* player = (AShooterPlayerController*)Killer;
int killerTeamId = player->TargetingTeamField();
ArkApi::GetApiUtils().SendChatMessage(player, "TestPlugin", *FString("[Structure Death] StructureTeamId: " + std::to_string(structureTeamId)));
ArkApi::GetApiUtils().SendChatMessage(player, "TestPlugin", *FString("[Structure Death] KillerTeamId: " + std::to_string(killerTeamId)));
}
}
}
Learn from the code of 0x21, I want to know How can I send a chat message to the building owner