Not able to read Tribe ID

Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Public Service Announcement

    Hey Guest, I’ve got some exciting news to share! 🎉

    Starting this December, I’ll be moving the entire GameServersHub website away from WordPress and rebuilding it in Next.js! This upgrade will bring incredibly faster speeds, smoother performance, and a modern user experience that sets the stage for everything coming next.

    In 2026, GameServersHub will be entering a new era. I’ll be revamping the entire platform from the ground up and launching a brand-new, fully modernized marketplace. It’ll feature a cleaner design, improved functionality, and better tools for both creators and server owners.

    On top of that, development has already started on the GameServerListing project at https://gsl-six.vercel.app/, which is expected to launch in early Q1 2026. This new system will make discovering and managing servers easier than ever before.


    👉 Stay in the loop!
    Join our Discord for behind-the-scenes updates, early previews, and community discussions.

    » Click here to join our Discord! «

    ~ MrOwlSky

warheat

Supporter Rank
Joined
Aug 11, 2018
Messages
9
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
 
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.
 
Try using TargetingTeamField which will return TribeId or PlayerId.
 
Back
Top