L L4D2node

CGamePlayerTeam::TargetTeamName

0x006f2ff0 · 127 bytes · __thiscall

_ZN15CGamePlayerTeam14TargetTeamNameEPKcP11CBaseEntity

Decompiled

undefined (3 params)

/* CGamePlayerTeam::TargetTeamName(char const*, CBaseEntity*) */

undefined4 __thiscall
CGamePlayerTeam::TargetTeamName(CGamePlayerTeam *this,char *param_1,CBaseEntity *param_2)

{
  char cVar1;
  undefined4 uVar2;
  CBaseEntity *this_00;
  
  this_00 = (CBaseEntity *)0x0;
  do {
    this_00 = (CBaseEntity *)
              CGlobalEntityList::FindEntityByName
                        ((CGlobalEntityList *)gEntList,this_00,param_1,(CBaseEntity *)0x0,param_2,
                         (CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
    if (this_00 == (CBaseEntity *)0x0) {
      return 0;
    }
    if (*(char **)(this_00 + 0x7c) == "game_team_master") break;
    cVar1 = CBaseEntity::ClassMatchesComplex(this_00,"game_team_master");
  } while (cVar1 == '\0');
  uVar2 = CBaseEntity::TeamID(this_00);
  return uVar2;
}

SourceMod gamedata

paste into addons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)

Just a Signatures{} block, ready to drop into a gamedata file. Wire it up in your plugin however you like - SDKCall, DHooks, raw memory ops, or anything else.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)