Начинающий
-
Автор темы
- #1
endscene:
что тут не так? сурс тгф
if (ImGui::Checkbox(charenc(u8"Ченджер перчаток"), &Vars.SkinChanger1.EnabledGlove))
{
U::CL_FullUpdate();
}
if (Vars.SkinChanger1.EnabledGlove)
{
if (ImGui::Combo(charenc("##1"), &Vars.SkinChanger1.Glove, GloveModel, ARRAYSIZE(GloveModel)))
{
U::CL_FullUpdate();
}
const char* gstr;
if (Vars.SkinChanger1.Glove == 0)
{
gstr = charenc("\0\0");
}
if (Vars.SkinChanger1.Glove == 1)
{
gstr = charenc("Charred\0\rSnakebite\0\rBronzed\0\rGuerilla\0\0");
}
else if (Vars.SkinChanger1.Glove == 2)
{
gstr = charenc("Hedge Maze\0\rPandoras Box\0\rSuperconductor\0\rArid\0\0");
}
else if (Vars.SkinChanger1.Glove == 3)
{
gstr = charenc("Lunar Weave\0\rConvoy\0\rCrimson Weave\0\rDiamondback\0\0");
}
else if (Vars.SkinChanger1.Glove == 4)
{
gstr = charenc("Leather\0\rSpruce DDPAT\0\rSlaughter\0\rBadlands\0\0");
}
else if (Vars.SkinChanger1.Glove == 5)
{
gstr = charenc("Eclipse\0\rSpearmint\0\rBoom!\0\rCool Mint\0\0");
}
else if (Vars.SkinChanger1.Glove == 6)
{
gstr = charenc("Forest DDPAT\0\rCrimson Kimono\0\rEmerald Web\0\rFoundation\0\0");
}
if (ImGui::Combo(charenc("##2"), &Vars.SkinChanger1.GloveSkin, gstr, -1))
{
U::CL_FullUpdate();
}
ImGui::SliderFloat(charenc(u8"Качество"), &Vars.SkinChanger1.GloveWear, 0, 1);
}
if (ImGui::Button(charenc(u8"Обновить"), ImVec2(93.f, 20.f)))
{
U::CL_FullUpdate();
}
{
U::CL_FullUpdate();
}
if (Vars.SkinChanger1.EnabledGlove)
{
if (ImGui::Combo(charenc("##1"), &Vars.SkinChanger1.Glove, GloveModel, ARRAYSIZE(GloveModel)))
{
U::CL_FullUpdate();
}
const char* gstr;
if (Vars.SkinChanger1.Glove == 0)
{
gstr = charenc("\0\0");
}
if (Vars.SkinChanger1.Glove == 1)
{
gstr = charenc("Charred\0\rSnakebite\0\rBronzed\0\rGuerilla\0\0");
}
else if (Vars.SkinChanger1.Glove == 2)
{
gstr = charenc("Hedge Maze\0\rPandoras Box\0\rSuperconductor\0\rArid\0\0");
}
else if (Vars.SkinChanger1.Glove == 3)
{
gstr = charenc("Lunar Weave\0\rConvoy\0\rCrimson Weave\0\rDiamondback\0\0");
}
else if (Vars.SkinChanger1.Glove == 4)
{
gstr = charenc("Leather\0\rSpruce DDPAT\0\rSlaughter\0\rBadlands\0\0");
}
else if (Vars.SkinChanger1.Glove == 5)
{
gstr = charenc("Eclipse\0\rSpearmint\0\rBoom!\0\rCool Mint\0\0");
}
else if (Vars.SkinChanger1.Glove == 6)
{
gstr = charenc("Forest DDPAT\0\rCrimson Kimono\0\rEmerald Web\0\rFoundation\0\0");
}
if (ImGui::Combo(charenc("##2"), &Vars.SkinChanger1.GloveSkin, gstr, -1))
{
U::CL_FullUpdate();
}
ImGui::SliderFloat(charenc(u8"Качество"), &Vars.SkinChanger1.GloveWear, 0, 1);
}
if (ImGui::Button(charenc(u8"Обновить"), ImVec2(93.f, 20.f)))
{
U::CL_FullUpdate();
}
struct hud_weapons_t {
std::int32_t* get_weapon_count() {
return reinterpret_cast<std::int32_t*>(std::uintptr_t(this) + 0x80);
}
};
template<class T>
static T* FindHudElement(const char* name)
{
static auto pThis = *reinterpret_cast<DWORD**>(U::FindPattern("client_panorama.dll", "B9 ? ? ? ? E8 ? ? ? ? 8B 5D 08") + 1);
static auto find_hud_element = reinterpret_cast<DWORD(__thiscall*)(void*, const char*)>(U::FindPattern("client_panorama.dll", "55 8B EC 53 8B 5D 08 56 57 8B F9 33 F6 39 77 28"));
return (T*)find_hud_element(pThis, name);
}
typedef void(*CL_FullUpdate_t) (void);
void U::CL_FullUpdate()
{
static auto dwrd = FindPattern("client_panorama.dll", "55 8B EC 51 53 56 8B 75 08 8B D9 57 6B FE 2C 89 5D FC");
if (offsets.FullUpdate) {
static auto clearHudWeaponIcon = dwrd;
if (clearHudWeaponIcon) {
static auto clear_hud_weapon_icon_fn =
reinterpret_cast<std::int32_t(__thiscall*)(void*, std::int32_t)>(clearHudWeaponIcon);
auto element = FindHudElement<std::uintptr_t*>(("CCSGO_HudWeaponSelection"));
if (element && clear_hud_weapon_icon_fn) {
auto hud_weapons = reinterpret_cast<hud_weapons_t*>(std::uintptr_t(element) - 0xA0);
if (hud_weapons == nullptr)
return;
if (!*hud_weapons->get_weapon_count())
return;
for (std::int32_t i = 0; i < *hud_weapons->get_weapon_count(); i++)
i = clear_hud_weapon_icon_fn(hud_weapons, i);
CL_FullUpdate_t cl_fullupdate = (CL_FullUpdate_t)(offsets.FullUpdate);
cl_fullupdate();
}
}
}
}
std::int32_t* get_weapon_count() {
return reinterpret_cast<std::int32_t*>(std::uintptr_t(this) + 0x80);
}
};
template<class T>
static T* FindHudElement(const char* name)
{
static auto pThis = *reinterpret_cast<DWORD**>(U::FindPattern("client_panorama.dll", "B9 ? ? ? ? E8 ? ? ? ? 8B 5D 08") + 1);
static auto find_hud_element = reinterpret_cast<DWORD(__thiscall*)(void*, const char*)>(U::FindPattern("client_panorama.dll", "55 8B EC 53 8B 5D 08 56 57 8B F9 33 F6 39 77 28"));
return (T*)find_hud_element(pThis, name);
}
typedef void(*CL_FullUpdate_t) (void);
void U::CL_FullUpdate()
{
static auto dwrd = FindPattern("client_panorama.dll", "55 8B EC 51 53 56 8B 75 08 8B D9 57 6B FE 2C 89 5D FC");
if (offsets.FullUpdate) {
static auto clearHudWeaponIcon = dwrd;
if (clearHudWeaponIcon) {
static auto clear_hud_weapon_icon_fn =
reinterpret_cast<std::int32_t(__thiscall*)(void*, std::int32_t)>(clearHudWeaponIcon);
auto element = FindHudElement<std::uintptr_t*>(("CCSGO_HudWeaponSelection"));
if (element && clear_hud_weapon_icon_fn) {
auto hud_weapons = reinterpret_cast<hud_weapons_t*>(std::uintptr_t(element) - 0xA0);
if (hud_weapons == nullptr)
return;
if (!*hud_weapons->get_weapon_count())
return;
for (std::int32_t i = 0; i < *hud_weapons->get_weapon_count(); i++)
i = clear_hud_weapon_icon_fn(hud_weapons, i);
CL_FullUpdate_t cl_fullupdate = (CL_FullUpdate_t)(offsets.FullUpdate);
cl_fullupdate();
}
}
}
}
if (I::Engine->IsInGame() && G::LocalPlayer && G::LocalPlayer->GetAlive())
{
while (stage == FRAME_NET_UPDATE_POSTDATAUPDATE_START)
{
if (!Vars.SkinChanger1.EnabledGlove)
break;
player_info_t localPlayerInfo;
CBaseEntity *pLocal = I::ClientEntList->GetClientEntity(I::Engine->GetLocalPlayer());
if (!pLocal)
break;
if (!I::Engine->GetPlayerInfo(I::Engine->GetLocalPlayer(), &localPlayerInfo))
break;
DWORD* hMyWearables = (DWORD*)((size_t)pLocal + offsets.m_hMyWearables);
if (hMyWearables)
{
if (!I::ClientEntList->GetClientEntityFromHandle((DWORD)hMyWearables[0]))
{
static ClientClass* pClass;
if (!pClass)
pClass = I::Client->GetAllClasses();
while (pClass)
{
if (pClass->m_ClassID == 52)
break;
pClass = pClass->m_pNext;
}
int iEntry = I::ClientEntList->GetHighestEntityIndex() + 1;
int iSerial = RandomInt(0x0, 0xFFF);
pClass->m_pCreateFn(iEntry, iSerial);
hMyWearables[0] = iEntry | (iSerial << 16);
CBaseEntity* pEnt = I::ClientEntList->GetClientEntityFromHandle((DWORD)hMyWearables[0]);
if (pEnt)
{
int modelindex = 0;
if (Vars.SkinChanger1.Glove == 1)
modelindex = I::ModelInfo->GetModelIndex(charenc("models/weapons/v_models/arms/glove_bloodhound/v_glove_bloodhound.mdl"));
else if (Vars.SkinChanger1.Glove == 2)
modelindex = I::ModelInfo->GetModelIndex(charenc("models/weapons/v_models/arms/glove_sporty/v_glove_sporty.mdl"));
else if (Vars.SkinChanger1.Glove == 3)
modelindex = I::ModelInfo->GetModelIndex(charenc("models/weapons/v_models/arms/glove_slick/v_glove_slick.mdl"));
else if (Vars.SkinChanger1.Glove == 4)
modelindex = I::ModelInfo->GetModelIndex(charenc("models/weapons/v_models/arms/glove_handwrap_leathery/v_glove_handwrap_leathery.mdl"));
else if (Vars.SkinChanger1.Glove == 5)
modelindex = I::ModelInfo->GetModelIndex(charenc("models/weapons/v_models/arms/glove_motorcycle/v_glove_motorcycle.mdl"));
else if (Vars.SkinChanger1.Glove == 6)
modelindex = I::ModelInfo->GetModelIndex(charenc("models/weapons/v_models/arms/glove_specialist/v_glove_specialist.mdl"));
int ItemDefinitionIndex;
if (Vars.SkinChanger1.Glove == 1)
{
ItemDefinitionIndex = 5027;
}
else if (Vars.SkinChanger1.Glove == 2)
{
ItemDefinitionIndex = 5030;
}
else if (Vars.SkinChanger1.Glove == 3)
{
ItemDefinitionIndex = 5031;
}
else if (Vars.SkinChanger1.Glove == 4)
{
ItemDefinitionIndex = 5032;
}
else if (Vars.SkinChanger1.Glove == 5)
{
ItemDefinitionIndex = 5033;
}
else if (Vars.SkinChanger1.Glove == 6)
{
ItemDefinitionIndex = 5034;
}
else
ItemDefinitionIndex = 0;
int paintkit;
if (Vars.SkinChanger1.Glove == 1)
{
switch (Vars.SkinChanger1.GloveSkin)
{
case 0:
paintkit = 10006;
break;
case 1:
paintkit = 10007;
break;
case 2:
paintkit = 10008;
break;
case 3:
paintkit = 10039;
break;
}
}
else if (Vars.SkinChanger1.Glove == 2)
{
switch (Vars.SkinChanger1.GloveSkin)
{
case 0:
paintkit = 10018;
break;
case 1:
paintkit = 10037;
break;
case 2:
paintkit = 10038;
break;
case 3:
paintkit = 10019;
break;
}
}
else if (Vars.SkinChanger1.Glove == 3)
{
switch (Vars.SkinChanger1.GloveSkin)
{
case 0:
paintkit = 10013;
break;
case 1:
paintkit = 10015;
break;
case 2:
paintkit = 10016;
break;
case 3:
paintkit = 10040;
break;
}
}
else if (Vars.SkinChanger1.Glove == 4)
{
switch (Vars.SkinChanger1.GloveSkin)
{
case 0:
paintkit = 10009;
break;
case 1:
paintkit = 10010;
break;
case 2:
paintkit = 10021;
break;
case 3:
paintkit = 10036;
break;
}
}
else if (Vars.SkinChanger1.Glove == 5)
{
switch (Vars.SkinChanger1.GloveSkin)
{
case 0:
paintkit = 10024;
break;
case 1:
paintkit = 10026;
break;
case 2:
paintkit = 10027;
break;
case 3:
paintkit = 10028;
break;
}
}
else if (Vars.SkinChanger1.Glove == 6)
{
switch (Vars.SkinChanger1.GloveSkin)
{
case 0:
paintkit = 10030;
break;
case 1:
paintkit = 10033;
break;
case 2:
paintkit = 10034;
break;
case 3:
paintkit = 10035;
break;
}
}
*(int*)((DWORD)pEnt + offsets.m_iItemDefinitionIndex) = ItemDefinitionIndex;
*(int*)((DWORD)pEnt + offsets.m_iItemIDHigh) = -1;
*(int*)((DWORD)pEnt + offsets.m_iEntityQuality) = 4;
*(int*)((DWORD)pEnt + offsets.m_iAccountID) = localPlayerInfo.xuidlow;
*(float*)((DWORD)pEnt + offsets.m_flFallbackWear) = Vars.SkinChanger1.GloveWear;
*(int*)((DWORD)pEnt + offsets.m_nFallbackSeed) = 0;
*(int*)((DWORD)pEnt + offsets.m_nFallbackStatTrak) = -1;
*(int*)((DWORD)pEnt + offsets.m_nFallbackPaintKit) = paintkit;
pEnt->SetModelIndex(modelindex);
pEnt->PreDataUpdate(DATA_UPDATE_CREATED);
}
}
}
break;
}
{
while (stage == FRAME_NET_UPDATE_POSTDATAUPDATE_START)
{
if (!Vars.SkinChanger1.EnabledGlove)
break;
player_info_t localPlayerInfo;
CBaseEntity *pLocal = I::ClientEntList->GetClientEntity(I::Engine->GetLocalPlayer());
if (!pLocal)
break;
if (!I::Engine->GetPlayerInfo(I::Engine->GetLocalPlayer(), &localPlayerInfo))
break;
DWORD* hMyWearables = (DWORD*)((size_t)pLocal + offsets.m_hMyWearables);
if (hMyWearables)
{
if (!I::ClientEntList->GetClientEntityFromHandle((DWORD)hMyWearables[0]))
{
static ClientClass* pClass;
if (!pClass)
pClass = I::Client->GetAllClasses();
while (pClass)
{
if (pClass->m_ClassID == 52)
break;
pClass = pClass->m_pNext;
}
int iEntry = I::ClientEntList->GetHighestEntityIndex() + 1;
int iSerial = RandomInt(0x0, 0xFFF);
pClass->m_pCreateFn(iEntry, iSerial);
hMyWearables[0] = iEntry | (iSerial << 16);
CBaseEntity* pEnt = I::ClientEntList->GetClientEntityFromHandle((DWORD)hMyWearables[0]);
if (pEnt)
{
int modelindex = 0;
if (Vars.SkinChanger1.Glove == 1)
modelindex = I::ModelInfo->GetModelIndex(charenc("models/weapons/v_models/arms/glove_bloodhound/v_glove_bloodhound.mdl"));
else if (Vars.SkinChanger1.Glove == 2)
modelindex = I::ModelInfo->GetModelIndex(charenc("models/weapons/v_models/arms/glove_sporty/v_glove_sporty.mdl"));
else if (Vars.SkinChanger1.Glove == 3)
modelindex = I::ModelInfo->GetModelIndex(charenc("models/weapons/v_models/arms/glove_slick/v_glove_slick.mdl"));
else if (Vars.SkinChanger1.Glove == 4)
modelindex = I::ModelInfo->GetModelIndex(charenc("models/weapons/v_models/arms/glove_handwrap_leathery/v_glove_handwrap_leathery.mdl"));
else if (Vars.SkinChanger1.Glove == 5)
modelindex = I::ModelInfo->GetModelIndex(charenc("models/weapons/v_models/arms/glove_motorcycle/v_glove_motorcycle.mdl"));
else if (Vars.SkinChanger1.Glove == 6)
modelindex = I::ModelInfo->GetModelIndex(charenc("models/weapons/v_models/arms/glove_specialist/v_glove_specialist.mdl"));
int ItemDefinitionIndex;
if (Vars.SkinChanger1.Glove == 1)
{
ItemDefinitionIndex = 5027;
}
else if (Vars.SkinChanger1.Glove == 2)
{
ItemDefinitionIndex = 5030;
}
else if (Vars.SkinChanger1.Glove == 3)
{
ItemDefinitionIndex = 5031;
}
else if (Vars.SkinChanger1.Glove == 4)
{
ItemDefinitionIndex = 5032;
}
else if (Vars.SkinChanger1.Glove == 5)
{
ItemDefinitionIndex = 5033;
}
else if (Vars.SkinChanger1.Glove == 6)
{
ItemDefinitionIndex = 5034;
}
else
ItemDefinitionIndex = 0;
int paintkit;
if (Vars.SkinChanger1.Glove == 1)
{
switch (Vars.SkinChanger1.GloveSkin)
{
case 0:
paintkit = 10006;
break;
case 1:
paintkit = 10007;
break;
case 2:
paintkit = 10008;
break;
case 3:
paintkit = 10039;
break;
}
}
else if (Vars.SkinChanger1.Glove == 2)
{
switch (Vars.SkinChanger1.GloveSkin)
{
case 0:
paintkit = 10018;
break;
case 1:
paintkit = 10037;
break;
case 2:
paintkit = 10038;
break;
case 3:
paintkit = 10019;
break;
}
}
else if (Vars.SkinChanger1.Glove == 3)
{
switch (Vars.SkinChanger1.GloveSkin)
{
case 0:
paintkit = 10013;
break;
case 1:
paintkit = 10015;
break;
case 2:
paintkit = 10016;
break;
case 3:
paintkit = 10040;
break;
}
}
else if (Vars.SkinChanger1.Glove == 4)
{
switch (Vars.SkinChanger1.GloveSkin)
{
case 0:
paintkit = 10009;
break;
case 1:
paintkit = 10010;
break;
case 2:
paintkit = 10021;
break;
case 3:
paintkit = 10036;
break;
}
}
else if (Vars.SkinChanger1.Glove == 5)
{
switch (Vars.SkinChanger1.GloveSkin)
{
case 0:
paintkit = 10024;
break;
case 1:
paintkit = 10026;
break;
case 2:
paintkit = 10027;
break;
case 3:
paintkit = 10028;
break;
}
}
else if (Vars.SkinChanger1.Glove == 6)
{
switch (Vars.SkinChanger1.GloveSkin)
{
case 0:
paintkit = 10030;
break;
case 1:
paintkit = 10033;
break;
case 2:
paintkit = 10034;
break;
case 3:
paintkit = 10035;
break;
}
}
*(int*)((DWORD)pEnt + offsets.m_iItemDefinitionIndex) = ItemDefinitionIndex;
*(int*)((DWORD)pEnt + offsets.m_iItemIDHigh) = -1;
*(int*)((DWORD)pEnt + offsets.m_iEntityQuality) = 4;
*(int*)((DWORD)pEnt + offsets.m_iAccountID) = localPlayerInfo.xuidlow;
*(float*)((DWORD)pEnt + offsets.m_flFallbackWear) = Vars.SkinChanger1.GloveWear;
*(int*)((DWORD)pEnt + offsets.m_nFallbackSeed) = 0;
*(int*)((DWORD)pEnt + offsets.m_nFallbackStatTrak) = -1;
*(int*)((DWORD)pEnt + offsets.m_nFallbackPaintKit) = paintkit;
pEnt->SetModelIndex(modelindex);
pEnt->PreDataUpdate(DATA_UPDATE_CREATED);
}
}
}
break;
}
что тут не так? сурс тгф