Solved Not able to read Tribe ID

warheat

New member
Messages
12
Likes
0
Points
1
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
 
Advertisement

Monetise Your Game Server

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

elmorti

New member
Messages
13
Likes
2
Points
3
Why don't you track SteamID->TribeID for you cluster servers in a SQLite? If tribeid=0 you can query the steamid in your sqlite.

But you'd have to handle tribeid updates to sqlite as well if they change/leave tribes but should not be hard.
 
Top