L L4D2node

CreateJeep

0x007a7a60 · 527 bytes · __regparm3

_ZL10CreateJeepP11CBasePlayer

Decompiled

undefined (1 param)

/* CreateJeep(CBasePlayer*) */

void __regparm3 CreateJeep(CBasePlayer *param_1)

{
  QAngle *pQVar1;
  CBaseEntity *this;
  float local_40;
  float local_3c;
  float local_38;
  float local_34;
  float local_30;
  float local_2c;
  undefined4 local_28;
  float local_24;
  undefined4 local_20;
  
  pQVar1 = (QAngle *)(**(code **)(*(int *)param_1 + 0x238))(param_1);
  AngleVectors(pQVar1,(Vector *)&local_40);
  this = (CBaseEntity *)CreateEntityByName("prop_vehicle_jeep",-1,true);
  if (this != (CBaseEntity *)0x0) {
    if (((byte)param_1[0x14d] & 8) == 0) {
      local_30 = local_3c * 256.0 + *(float *)(param_1 + 0x2e4);
      local_34 = local_40 * 256.0 + *(float *)(param_1 + 0x2e0);
      local_2c = *(float *)(param_1 + 0x2e8) + 64.0 + local_38 * 256.0;
    }
    else {
      CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
      local_30 = local_3c * 256.0 + *(float *)(param_1 + 0x2e4);
      local_34 = local_40 * 256.0 + *(float *)(param_1 + 0x2e0);
      local_2c = *(float *)(param_1 + 0x2e8) + 64.0 + local_38 * 256.0;
      if ((*(uint *)(param_1 + 0x14c) & 0x800) != 0) {
        CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
      }
    }
    local_24 = *(float *)(param_1 + 0x380) - 90.0;
    local_28 = 0;
    local_20 = 0;
    CBaseEntity::SetAbsOrigin(this,(Vector *)&local_34);
    CBaseEntity::SetAbsAngles(this,(QAngle *)&local_28);
    (**(code **)(*(int *)this + 0x84))(this,"model","models/buggy.mdl");
    (**(code **)(*(int *)this + 0x84))(this,"solid","6");
    (**(code **)(*(int *)this + 0x84))(this,"targetname","jeep");
    (**(code **)(*(int *)this + 0x84))(this,"vehiclescript","scripts/vehicles/jeep_test.txt");
    DispatchSpawn(this,true);
    (**(code **)(*(int *)this + 0x94))(this);
    (**(code **)(*(int *)this + 0x1dc))(this,(Vector *)&local_34,(QAngle *)&local_28,0);
  }
  return;
}

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)