-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
!!! I AM KNOTTSBRO ON UC !!!
I've noticed quite a few threads asking about how to properly hook FindMDL in ayyware. Since I'm bored (and have no use for this), Here's an easy tutorial on how to properly hook FindMDL in ayyware.
THIS IS PURE SPOONFEED.
(also, sorry this formatting is ass, this is my first time making a tutorial.)
Step 1) Getting the necessary class for FindMDL:
Step 2) Creating the actual interface:
What is most important here is that in your offsets, you create a new module called DataCache. You will want it to define it as the following in Offsets.cpp:
Code:
Code:
Code:
Code:
Code:
Code:
Step 3) Hooking it:
First you want to create a new VMTManager called VMTMDLCache.
Then at the top of Hooks.cpp, add these 3 lines:
Code:
Code:
Code:
have fun
I've noticed quite a few threads asking about how to properly hook FindMDL in ayyware. Since I'm bored (and have no use for this), Here's an easy tutorial on how to properly hook FindMDL in ayyware.
THIS IS PURE SPOONFEED.
(also, sorry this formatting is ass, this is my first time making a tutorial.)
Step 1) Getting the necessary class for FindMDL:
Пожалуйста, авторизуйтесь для просмотра ссылки.
- Get the entirety of this hastebin and put it in a new header file called IMDLCache.h, and then include that header file in your SDK.hStep 2) Creating the actual interface:
What is most important here is that in your offsets, you create a new module called DataCache. You will want it to define it as the following in Offsets.cpp:
Code:
- Modules::DataCaches = Utilities::Memory::WaitOnModuleHandle("datacache.dll");
Code:
- IMDLCache* ModelCache;
Code:
- CreateInterface_t DataCaching = NULL;
Code:
- DataCaching = (CreateInterface_t)GetProcAddress((HMODULE)Offsets::Modules::DataCaches, "CreateInterface");
Code:
- char* pDataCache = (char*)Utilities::Memory::FindTextPattern("datacache.dll", "MDLCache00");
Code:
- ModelCache = (IMDLCache*)DataCaching(pDataCache, NULL);
Step 3) Hooking it:
First you want to create a new VMTManager called VMTMDLCache.
Then at the top of Hooks.cpp, add these 3 lines:
Code:
- typedef MDLHandle_t(__thiscall* iFindMdl)(void*, char*);
- iFindMdl oFindMDL;
- MDLHandle_t __fastcall hkFindMDL(void*, void*, char*);
Code:
- VMTModelCache.Initialise((DWORD*)Interfaces::ModelCache);
- oFindMDL = (iFindMdl)VMTModelCache.HookMethod((DWORD)&hkFindMDL, 10);
Code:
- MDLHandle_t __fastcall hkFindMDL(void* ecx, void* edx, char* FilePath)
- {
- if (strstr(FilePath, "ak47.mdl"))
- return oFindMDL(ecx, "models/weapons/v_cod_ak117.mdl");
- if (strstr(FilePath, "awp.mdl"))
- return oFindMDL(ecx, "models/weapons/v_cod9_ballista.mdl");
- if (strstr(FilePath, "deagle.mdl"))
- return oFindMDL(ecx, "models/weapons/v_deagle_phoenix.mdl");
- if (strstr(FilePath, "knife_default_ct.mdl") || strstr(FilePath, "knife_default_t.mdl"))
- return oFindMDL(ecx, "models/weapons/v_cfaxerose.mdl");
- return oFindMDL(ecx, FilePath);
- }
have fun