L L4D2node

GetClientColor

0x0051f7b0 · 69 bytes · __cdecl

_Z14GetClientColorP13CTerrorPlayer

Decompiled

undefined (1 param)

/* GetClientColor(CTerrorPlayer*) */

CTerrorPlayer * GetClientColor(CTerrorPlayer *param_1)

{
  int iVar1;
  CBaseEntity *in_stack_00000008;
  
  if (in_stack_00000008 != (CBaseEntity *)0x0) {
    iVar1 = CBaseEntity::GetTeamNumber(in_stack_00000008);
    if ((iVar1 == 4) || (iVar1 == 2)) {
      *(undefined4 *)param_1 = g_ColorSurvivor;
      return param_1;
    }
  }
  *(undefined4 *)param_1 = g_ColorZombie;
  return param_1;
}

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)