CC_Player_SetModel
0x00641090 · 178 bytes · __cdecl
_Z18CC_Player_SetModelRK8CCommand
Decompiled
undefined (1 param)
/* CC_Player_SetModel(CCommand const&) */
void CC_Player_SetModel(CCommand *param_1)
{
char cVar1;
CBaseEntity *pCVar2;
int iVar3;
int iVar4;
if (*(char *)(gpGlobals + 0x4d) == '\0') {
pCVar2 = (CBaseEntity *)UTIL_GetCommandClient();
if (((pCVar2 != (CBaseEntity *)0x0) &&
(cVar1 = (**(code **)(*(int *)pCVar2 + 0x16c))(pCVar2), cVar1 != '\0')) &&
(*(int *)param_1 == 2)) {
V_snprintf(CC_Player_SetModel(CCommand_const&)::szName,0x100,"models/%s.mdl",
*(undefined4 *)(param_1 + 0x40c));
(**(code **)(*(int *)pCVar2 + 0x70))(pCVar2,CC_Player_SetModel(CCommand_const&)::szName);
iVar3 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
iVar4 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
UTIL_SetSize(pCVar2,(Vector *)(iVar4 + 0xc),(Vector *)(iVar3 + 0x18));
}
return;
}
return;
}
SourceMod gamedata
paste intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.