By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!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
Thank you very much! Is just what I need.
DECLARE_HOOK(AShooterCharacter_TakeDamage, float, AShooterCharacter *, float, FDamageEvent *, AController *, AActor *);
float Hook_AShooterCharacter_TakeDamage(AShooterCharacter *_this, float Damage, FDamageEvent * DamageEvent, AController* EventInstigator, AActor * DamageCauser)
{
if (_this && _this->PlayerStateField() && EventInstigator && !EventInstigator->IsLocalController() && EventInstigator->IsA(AShooterPlayerController::StaticClass()))
{
AShooterPlayerController* InstigatorShooterController = static_cast<AShooterPlayerController*>(EventInstigator);
if (InstigatorShooterController && InstigatorShooterController->PlayerStateField() && InstigatorShooterController->GetPlayerCharacter())
{
if (InstigatorShooterController->GetPlayerCharacter()->CurrentWeaponField() && InstigatorShooterController->GetPlayerCharacter()->CurrentWeaponField()->AssociatedPrimalItemField())
{
UPrimalItem* WeaponItem = InstigatorShooterController->GetPlayerCharacter()->CurrentWeaponField()->AssociatedPrimalItemField();
const FString WeaponItemBP = ArkApi::IApiUtils::GetItemBlueprint(WeaponItem);
if (WeaponItemBP.EndsWith("PrimalItem_WeaponOneShotRifle'"))
{//长管步枪;
return AShooterCharacter_TakeDamage_original(_this, 1.0f, DamageEvent, EventInstigator, DamageCauser);
}
else if (WeaponItemBP.EndsWith("PrimalItem_WeaponMachinedSniper'"))
{//制式狙击步枪;
return AShooterCharacter_TakeDamage_original(_this, 1.0f, DamageEvent, EventInstigator, DamageCauser);
}
}
}
}
return AShooterCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser);
}
try AShooterCharacter::GetPrivateStaticClass() or AShooterCharacter::StaticClass()
on another note.
if you want to intercept both character and dino damage hook APrimalCharacter::TakeDamage
if you want to intercept dino damage hook APrimalDinoCharacter::TakeDamage
Thank you very much, my problem has been solved ~~~_this->IsA(AShooterCharacter::GetPrivateStaticClass())
We use essential cookies to make this site work, and optional cookies to enhance your experience.