MDLHandle_t __fastcall hkFindMDL(void* ecx, void* edx, char* FilePath) //hooking the custom models
{
if (bCustomModelsNeedUpdate = true);
if (strstr(FilePath, "ak47.mdl"))
return oFindMDL(ecx, "models/weapons/aks74u_anims.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/tridagger.vtf");
return oFindMDL(ecx, FilePath);
}
void Loadcustommodels()
{
bCustomModelsNeedUpdate = true;
}
#pragma region CustomModels
CustomModels.SetPosition(400, 265);
CustomModels.SetText("Custom Models");
CustomModels.SetSize(376, 100);
RegisterControl(&CustomModels);
EnableCustomModels.SetFileId("custom_models_enable");
CustomModels.PlaceLabledControl("Enable Custom Model Changer", this, &EnableCustomModels);
CustomModelApply.SetText("Apply Custom Models");
CustomModelApply.SetCallback(Loadcustommodels);
CustomModelApply.SetPosition(407, 318);
CustomModelApply.SetSize(360, 106);
RegisterControl(&CustomModelApply);
#pragma endregion
MDLHandle_t __fastcall hkFindMDL(void* ecx, void* edx, char* FilePath)
{
if (Menu::Window.MiscTab.ApplyCustomModel.GetState()) {
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, "v_knife_default_ct.mdl") || strstr(FilePath, "v_knife_default_t.mdl"))
return oFindMDL(ecx, "models/weapons/v_minecraft_pickaxe.mdl");
return oFindMDL(ecx, FilePath);
}
}
ApplyCustomModel.SetFileId("ApplyCustomModels");
OtherSafeMode.SetState(true);
OtherGroup.PlaceLabledControl("Apply Custom Models", this, &ApplyCustomModel);