Ну и что вы думаете? Мы взяли и создали свой собственный чат, с блекджеком и шлюхами, теперь все легенды в одном месте: даже те 1000 человек, которых мы забанили в старом чате 🫡 Будем публиковать там очень интересные подробности нового дизайна форума, oh yeah
Вступай и становись легендой, пока это не стало поздно: жмякай на меня, ток не сильно(
hook(SetModel);Я знаю есть SetModel(); как ее хукнуть и юзать?
void T::SkinsChanger()
{
ImGui::BeginChild(CS_XOR("misc.settings"), ImVec2(0, ImGui::GetContentRegionAvail().y / 2.f), true, ImGuiWindowFlags_MenuBar);
{
if (ImGui::Button(CS_XOR("Refresh list##player_model"), ImVec2(-1, 15 * MENU::flDpiScale))) {
bNeedToUpdate = true;
}
if (bNeedToUpdate) {
ImGui::EndChild();
ModelChanger->UpdatePlayerModels();
bNeedToUpdate = false;
return;
}
// Отрисовка списка
if (ModelChanger->vecPlayerModels.empty()) {
ImGui::TextUnformatted("No models found.");
}
else {
ImGui::PushItemWidth(-1);
if (ImGui::BeginListBox(CS_XOR("##player_model.list"), ImVec2(0, 100))) {
for (std::size_t i = 0U; i < ModelChanger->vecPlayerModels.size(); i++) {
Model_t pModel = ModelChanger->vecPlayerModels[i];
if (ImGui::Selectable(pModel.strModelName.c_str(), (ModelChanger->nSelectedPlayerModel == i)))
ModelChanger->nSelectedPlayerModel = i;
}
ImGui::EndListBox();
ImGui::Checkbox(CS_XOR("PlayerModelChanger"), &C_GET(bool, Vars.bPlayerModelChanger));
if (C_GET(bool, Vars.bPlayerModelChanger))
ModelChanger->SetPlayerModel();
}
ImGui::PopItemWidth();
}
}
#include "modelchanger.h"
#include <iostream>
#include <filesystem>
#include <algorithm>
#include "../../sdk/interfaces/iresourcesystem.h"
#include "../../sdk/entity.h"
#include "../../core/interfaces.h"
#include "../../utilities/string.h"
#include "../../sdk/interfaces/iengineclient.h"
#include "../../core/sdk.h"
#include "../../core/variables.h"
void CModelChanger::UpdateWeaponModels() {
std::vector<Model_t> vecWeaponModels;
std::string strModelsDirectory = STR::GetDirectory(WeaponModels);
for (const auto& entry : std::filesystem::recursive_directory_iterator(strModelsDirectory)) {
if (!entry.is_regular_file())
continue;
std::string strFileName = entry.path().filename().string();
if (strFileName.size() < 6)
continue;
if (strFileName.substr(strFileName.size() - 7) != ".vmdl_c")
continue;
std::string strModelPath = entry.path().string();
strModelPath = strModelPath.substr(0, strModelPath.size() - 2);
std::replace(strModelPath.begin(), strModelPath.end(), '\\', '/');
size_t pos = strModelPath.find("weapons/");
if (pos != std::string::npos)
strModelPath = strModelPath.substr(pos);
Model_t pModel;
pModel.strModelName = strFileName.substr(0, strFileName.size() - 8);
pModel.strModelPath = strModelPath;
vecWeaponModels.push_back(pModel);
}
ModelChanger->vecWeaponModels = vecWeaponModels;
}
void CModelChanger::UpdatePlayerModels() {
std::vector<Model_t> vecPlayerModels;
std::string strModelsDirectory = STR::GetDirectory(PlayerModels);
for (const auto& entry : std::filesystem::recursive_directory_iterator(strModelsDirectory)) {
if (!entry.is_regular_file())
continue;
std::string strFileName = entry.path().filename().string();
if (strFileName.size() < 6)
continue;
if (strFileName.substr(strFileName.size() - 7) != ".vmdl_c")
continue;
if (strFileName.find("arm") != std::string::npos)
continue;
std::string strModelPath = entry.path().string();
strModelPath = strModelPath.substr(0, strModelPath.size() - 2);
std::replace(strModelPath.begin(), strModelPath.end(), '\\', '/');
size_t pos = strModelPath.find("characters/models/");
if (pos != std::string::npos)
strModelPath = strModelPath.substr(pos);
Model_t pModel;
pModel.strModelName = strFileName.substr(0, strFileName.size() - 8);
pModel.strModelPath = strModelPath;
vecPlayerModels.push_back(pModel);
}
ModelChanger->vecPlayerModels = vecPlayerModels;
}
bool CModelChanger::SetPlayerModel() {
if (!I::Engine->IsInGame() || !I::Engine->IsConnected())
return false;
if (!SDK::LocalPawn || SDK::LocalPawn->GetHealth() > 0)
return false;
if (C_GET(bool, Vars.bPlayerModelChanger)) {
if (nSelectedPlayerModel == ~1U)
return false;
if (vecPlayerModels.size() <= nSelectedPlayerModel)
return false;
Model_t pModel = vecPlayerModels[nSelectedPlayerModel];
const char* szModelPath = pModel.strModelPath.c_str();
auto uPlayerModelHash = FNV1A::Hash(szModelPath);
if (ModelChanger->uLastPlayerModelHash == uPlayerModelHash)
return false;
ModelChanger->uLastPlayerModelHash = uPlayerModelHash;
I::ResourceSystem->PreCache(szModelPath);
SDK::LocalPawn->SetModel(szModelPath);
}
return true;
}
void C_BaseModelEntity::SetModel(const char* szModelName) {
using SetModel_t = void(CS_FASTCALL*)(C_BaseModelEntity* pBaseModelEntity, const char* szModelName);
static auto fnSetModel = reinterpret_cast<SetModel_t>(MEM::FindPattern(CLIENT_DLL, "40 53 48 83 EC 20 48 8B D9 4C 8B C2 48 8B 0D ? ? ? ? 48 8D 54 24"));
fnSetModel(this, szModelName);
}
сигнатуру попробуй обнови хзззКод:void T::SkinsChanger() { ImGui::BeginChild(CS_XOR("misc.settings"), ImVec2(0, ImGui::GetContentRegionAvail().y / 2.f), true, ImGuiWindowFlags_MenuBar); { if (ImGui::Button(CS_XOR("Refresh list##player_model"), ImVec2(-1, 15 * MENU::flDpiScale))) { bNeedToUpdate = true; } if (bNeedToUpdate) { ImGui::EndChild(); ModelChanger->UpdatePlayerModels(); bNeedToUpdate = false; return; } // Отрисовка списка if (ModelChanger->vecPlayerModels.empty()) { ImGui::TextUnformatted("No models found."); } else { ImGui::PushItemWidth(-1); if (ImGui::BeginListBox(CS_XOR("##player_model.list"), ImVec2(0, 100))) { for (std::size_t i = 0U; i < ModelChanger->vecPlayerModels.size(); i++) { Model_t pModel = ModelChanger->vecPlayerModels[i]; if (ImGui::Selectable(pModel.strModelName.c_str(), (ModelChanger->nSelectedPlayerModel == i))) ModelChanger->nSelectedPlayerModel = i; } ImGui::EndListBox(); } ImGui::PopItemWidth(); } }
modelchanger.cpp:#include "modelchanger.h" #include <iostream> #include <filesystem> #include <algorithm> #include "../../sdk/interfaces/iresourcesystem.h" #include "../../sdk/entity.h" #include "../../core/interfaces.h" #include "../../utilities/string.h" #include "../../sdk/interfaces/iengineclient.h" #include "../../core/sdk.h" #include "../../core/variables.h" void CModelChanger::UpdateWeaponModels() { std::vector<Model_t> vecWeaponModels; std::string strModelsDirectory = STR::GetDirectory(WeaponModels); for (const auto& entry : std::filesystem::recursive_directory_iterator(strModelsDirectory)) { if (!entry.is_regular_file()) continue; std::string strFileName = entry.path().filename().string(); if (strFileName.size() < 6) continue; if (strFileName.substr(strFileName.size() - 7) != ".vmdl_c") continue; std::string strModelPath = entry.path().string(); strModelPath = strModelPath.substr(0, strModelPath.size() - 2); std::replace(strModelPath.begin(), strModelPath.end(), '\\', '/'); size_t pos = strModelPath.find("weapons/"); if (pos != std::string::npos) strModelPath = strModelPath.substr(pos); Model_t pModel; pModel.strModelName = strFileName.substr(0, strFileName.size() - 8); pModel.strModelPath = strModelPath; vecWeaponModels.push_back(pModel); } ModelChanger->vecWeaponModels = vecWeaponModels; } void CModelChanger::UpdatePlayerModels() { std::vector<Model_t> vecPlayerModels; std::string strModelsDirectory = STR::GetDirectory(PlayerModels); for (const auto& entry : std::filesystem::recursive_directory_iterator(strModelsDirectory)) { if (!entry.is_regular_file()) continue; std::string strFileName = entry.path().filename().string(); if (strFileName.size() < 6) continue; if (strFileName.substr(strFileName.size() - 7) != ".vmdl_c") continue; if (strFileName.find("arm") != std::string::npos) continue; std::string strModelPath = entry.path().string(); strModelPath = strModelPath.substr(0, strModelPath.size() - 2); std::replace(strModelPath.begin(), strModelPath.end(), '\\', '/'); size_t pos = strModelPath.find("characters/models/"); if (pos != std::string::npos) strModelPath = strModelPath.substr(pos); Model_t pModel; pModel.strModelName = strFileName.substr(0, strFileName.size() - 8); pModel.strModelPath = strModelPath; vecPlayerModels.push_back(pModel); } ModelChanger->vecPlayerModels = vecPlayerModels; } bool CModelChanger::SetPlayerModel() { if (!I::Engine->IsInGame() || !I::Engine->IsConnected()) return false; if (!SDK::LocalPawn || SDK::LocalPawn->GetHealth() > 0) return false; if (C_GET(bool, Vars.bPlayerModelChanger)) { if (nSelectedPlayerModel == ~1U) return false; if (vecPlayerModels.size() <= nSelectedPlayerModel) return false; Model_t pModel = vecPlayerModels[nSelectedPlayerModel]; const char* szModelPath = pModel.strModelPath.c_str(); auto uPlayerModelHash = FNV1A::Hash(szModelPath); if (ModelChanger->uLastPlayerModelHash == uPlayerModelHash) return false; ModelChanger->uLastPlayerModelHash = uPlayerModelHash; I::ResourceSystem->PreCache(szModelPath); SDK::LocalPawn->SetModel(szModelPath); } return true; }
SetModel:void C_BaseModelEntity::SetModel(const char* szModelName) { using SetModel_t = void(CS_FASTCALL*)(C_BaseModelEntity* pBaseModelEntity, const char* szModelName); static auto fnSetModel = reinterpret_cast<SetModel_t>(MEM::FindPattern(CLIENT_DLL, "40 53 48 83 EC 20 48 8B D9 4C 8B C2 48 8B 0D ? ? ? ? 48 8D 54 24")); fnSetModel(this, szModelName); }
вилетает чит когда обновляю модельки
че то не правильно сделал тогда. В откладке посмотри где он вылетает через стек вызововКод:void T::SkinsChanger() { ImGui::BeginChild(CS_XOR("misc.settings"), ImVec2(0, ImGui::GetContentRegionAvail().y / 2.f), true, ImGuiWindowFlags_MenuBar); { if (ImGui::Button(CS_XOR("Refresh list##player_model"), ImVec2(-1, 15 * MENU::flDpiScale))) { bNeedToUpdate = true; } if (bNeedToUpdate) { ImGui::EndChild(); ModelChanger->UpdatePlayerModels(); bNeedToUpdate = false; return; } // Отрисовка списка if (ModelChanger->vecPlayerModels.empty()) { ImGui::TextUnformatted("No models found."); } else { ImGui::PushItemWidth(-1); if (ImGui::BeginListBox(CS_XOR("##player_model.list"), ImVec2(0, 100))) { for (std::size_t i = 0U; i < ModelChanger->vecPlayerModels.size(); i++) { Model_t pModel = ModelChanger->vecPlayerModels[i]; if (ImGui::Selectable(pModel.strModelName.c_str(), (ModelChanger->nSelectedPlayerModel == i))) ModelChanger->nSelectedPlayerModel = i; } ImGui::EndListBox(); ImGui::Checkbox(CS_XOR("PlayerModelChanger"), &C_GET(bool, Vars.bPlayerModelChanger)); if (C_GET(bool, Vars.bPlayerModelChanger)) ModelChanger->SetPlayerModel(); } ImGui::PopItemWidth(); } }
modelchanger.cpp:#include "modelchanger.h" #include <iostream> #include <filesystem> #include <algorithm> #include "../../sdk/interfaces/iresourcesystem.h" #include "../../sdk/entity.h" #include "../../core/interfaces.h" #include "../../utilities/string.h" #include "../../sdk/interfaces/iengineclient.h" #include "../../core/sdk.h" #include "../../core/variables.h" void CModelChanger::UpdateWeaponModels() { std::vector<Model_t> vecWeaponModels; std::string strModelsDirectory = STR::GetDirectory(WeaponModels); for (const auto& entry : std::filesystem::recursive_directory_iterator(strModelsDirectory)) { if (!entry.is_regular_file()) continue; std::string strFileName = entry.path().filename().string(); if (strFileName.size() < 6) continue; if (strFileName.substr(strFileName.size() - 7) != ".vmdl_c") continue; std::string strModelPath = entry.path().string(); strModelPath = strModelPath.substr(0, strModelPath.size() - 2); std::replace(strModelPath.begin(), strModelPath.end(), '\\', '/'); size_t pos = strModelPath.find("weapons/"); if (pos != std::string::npos) strModelPath = strModelPath.substr(pos); Model_t pModel; pModel.strModelName = strFileName.substr(0, strFileName.size() - 8); pModel.strModelPath = strModelPath; vecWeaponModels.push_back(pModel); } ModelChanger->vecWeaponModels = vecWeaponModels; } void CModelChanger::UpdatePlayerModels() { std::vector<Model_t> vecPlayerModels; std::string strModelsDirectory = STR::GetDirectory(PlayerModels); for (const auto& entry : std::filesystem::recursive_directory_iterator(strModelsDirectory)) { if (!entry.is_regular_file()) continue; std::string strFileName = entry.path().filename().string(); if (strFileName.size() < 6) continue; if (strFileName.substr(strFileName.size() - 7) != ".vmdl_c") continue; if (strFileName.find("arm") != std::string::npos) continue; std::string strModelPath = entry.path().string(); strModelPath = strModelPath.substr(0, strModelPath.size() - 2); std::replace(strModelPath.begin(), strModelPath.end(), '\\', '/'); size_t pos = strModelPath.find("characters/models/"); if (pos != std::string::npos) strModelPath = strModelPath.substr(pos); Model_t pModel; pModel.strModelName = strFileName.substr(0, strFileName.size() - 8); pModel.strModelPath = strModelPath; vecPlayerModels.push_back(pModel); } ModelChanger->vecPlayerModels = vecPlayerModels; } bool CModelChanger::SetPlayerModel() { if (!I::Engine->IsInGame() || !I::Engine->IsConnected()) return false; if (!SDK::LocalPawn || SDK::LocalPawn->GetHealth() > 0) return false; if (C_GET(bool, Vars.bPlayerModelChanger)) { if (nSelectedPlayerModel == ~1U) return false; if (vecPlayerModels.size() <= nSelectedPlayerModel) return false; Model_t pModel = vecPlayerModels[nSelectedPlayerModel]; const char* szModelPath = pModel.strModelPath.c_str(); auto uPlayerModelHash = FNV1A::Hash(szModelPath); if (ModelChanger->uLastPlayerModelHash == uPlayerModelHash) return false; ModelChanger->uLastPlayerModelHash = uPlayerModelHash; I::ResourceSystem->PreCache(szModelPath); SDK::LocalPawn->SetModel(szModelPath); } return true; }
SetModel:void C_BaseModelEntity::SetModel(const char* szModelName) { using SetModel_t = void(CS_FASTCALL*)(C_BaseModelEntity* pBaseModelEntity, const char* szModelName); static auto fnSetModel = reinterpret_cast<SetModel_t>(MEM::FindPattern(CLIENT_DLL, "40 53 48 83 EC 20 48 8B D9 4C 8B C2 48 8B 0D ? ? ? ? 48 8D 54 24")); fnSetModel(this, szModelName); }
вилетает чит когда обновляю модельки
Проект предоставляет различный материал, относящийся к сфере киберспорта, программирования, ПО для игр, а также позволяет его участникам общаться на многие другие темы. Почта для жалоб: admin@yougame.biz