-
Автор темы
- #1
Code:
- bool PrecacheModel(const char* szModelName)
- {
- INetworkStringTable* m_pModelPrecacheTable = (INetworkStringTable*)(*(DWORD*)(offys.ClientState + 0x5220));
- if (m_pModelPrecacheTable)
- {
- ModelInfo->FindOrLoadModel(szModelName);
- int idx = m_pModelPrecacheTable->AddString(false, szModelName);
- if (idx == INVALID_STRING_INDEX)
- return false;
- }
- return true;
- }
- Code:
pEntity->SetModelIndex(ModelInfo->GetModelIndex("custom_model"));
SetModelIndex is virtual function!