Hi,
I am trying to read the tribe ID of every player that joins to my servers for my plugin functions.
I have a cluster, one is Ragnarok and other is Extinction.
I am using the following codes to read the tribe ID, but when players travel from one server to the other, their tribe ID is 0.
Can anyone help me out in this?
Or could someone guide me to a proper way of getting the tribe id like this?
DECLARE_HOOK(AShooterGameMode_HandleNewPlayer, bool, AShooterGameMode*, AShooterPlayerController*, UPrimalPlayerData*, AShooterCharacter*, bool);
ArkApi::GetHooks().SetHook("AShooterGameMode.HandleNewPlayer_Implementation", &Hook_AShooterGameMode_HandleNewPlayer, &AShooterGameMode_HandleNewPlayer_original);
bool Hook_AShooterGameMode_HandleNewPlayer(AShooterGameMode* _this, AShooterPlayerController* new_player, UPrimalPlayerData* player_data, AShooterCharacter* player_character, bool is_from_login)
{
const uint64 player_steam_id = ArkApi::IApiUtils::GetSteamIdFromController((AController *)new_player);
const uint64 player_id = _this->GetPlayerIDForSteamID(player_steam_id);
const uint64 player_tribe_id = _this->GetTribeIDOfPlayerID(player_id);
}
Thanks in advance
I am trying to read the tribe ID of every player that joins to my servers for my plugin functions.
I have a cluster, one is Ragnarok and other is Extinction.
I am using the following codes to read the tribe ID, but when players travel from one server to the other, their tribe ID is 0.
Can anyone help me out in this?
Or could someone guide me to a proper way of getting the tribe id like this?
DECLARE_HOOK(AShooterGameMode_HandleNewPlayer, bool, AShooterGameMode*, AShooterPlayerController*, UPrimalPlayerData*, AShooterCharacter*, bool);
ArkApi::GetHooks().SetHook("AShooterGameMode.HandleNewPlayer_Implementation", &Hook_AShooterGameMode_HandleNewPlayer, &AShooterGameMode_HandleNewPlayer_original);
bool Hook_AShooterGameMode_HandleNewPlayer(AShooterGameMode* _this, AShooterPlayerController* new_player, UPrimalPlayerData* player_data, AShooterCharacter* player_character, bool is_from_login)
{
const uint64 player_steam_id = ArkApi::IApiUtils::GetSteamIdFromController((AController *)new_player);
const uint64 player_id = _this->GetPlayerIDForSteamID(player_steam_id);
const uint64 player_tribe_id = _this->GetTribeIDOfPlayerID(player_id);
}
Thanks in advance