Open Source 🎩 [SOURCE CODE] CS 2 China Hat ESP – Clean & Optimized Draw Code

1nightwisj

Platinum Üye
Katılım
7 Ağu 2024
Mesajlar
106
Beğeniler
18
İletişim
Selam CheatGlobal üyeleri 👋


Bugün sizlerle ImGui tabanlı “China Hat” Source Kodunu paylaşıyorum
Kod, ESP sistemlerinde görsel farkındalığı artırmak için geliştirilmiştir ve oldukça optimize bir şekilde yazılmıştır.
Basitçe söylemek gerekirse; bu kod, oyuncunun kafasının üstünde koni şeklinde bir şapka oluşturmamızı sağlar.

Kod eğitim ve öğrenme amaçlıdır, hile yazıyorsanız ekstra özellik olarak ekliyebilirsiniz keyifli kullanımlar :)
  • Dil: C++ / ImGui
  • Sonuç: Oyuncunun kafasında ChinaHat yani koniye benzeyen bir şapka oluşturur
  • Yapı: 3D koordinatları ekrana dönüştürür, ardından “WorldToScreen” fonksiyonu ile 2D çizim yapar



  • C++:
    if (ChinaHat)
            {
                ImU32 hatColor = IM_COL32(
                    static_cast<int>(Options::ESP::Color[0] * 255.f),
                    static_cast<int>(Options::ESP::Color[1] * 255.f),
                    static_cast<int>(Options::ESP::Color[2] * 255.f),
                    255
                );
    
                float h= 1.2f;
                float r= 1.6f;
                float o= 0.6f;
    
                Vectors::Vector3 headPos = player.Head.Position() + Vectors::Vector3{ 0.f, headOffset, 0.f };
    
                std::vector<Vectors::Vector3> basePoints;
                int segments = 264;
                for (int i = 0; i < segments; i++)
                {
                    float angle = (2 * 3.14159265f / segments) * i;
                    float x = headPos.x + cosf(angle) * r;
                    float z = headPos.z + sinf(angle) * r;
                    basePoints.push_back({ x, headPos.y, z });
                }
    
                auto apex3D = headPos + Vectors::Vector3{ 0.f, h, 0.f };
    
                auto apex2D = WorldToScreen(apex3D);
                for (auto& pt : basePoints)
                {
                    auto base2D = WorldToScreen(pt);
                    if (apex2D.x != -1 && base2D.x != -1)
                        drawList->AddLine(ImVec2(apex2D.x, apex2D.y), ImVec2(base2D.x, base2D.y), hatColor, 1.5f);
                }
    
    
                for (int i = 0; i < segments; i++)
                {
                    auto a = WorldToScreen(basePoints[i]);
                    auto b = WorldToScreen(basePoints[(i + 1) % segments]);
                    if (a.x != -1 && b.x != -1)
                        drawList->AddLine(ImVec2(a.x, a.y), ImVec2(b.x, b.y), hatColor, 1.5f);
                }
            }

 
Selam CheatGlobal üyeleri 👋


Bugün sizlerle ImGui tabanlı “China Hat” Source Kodunu paylaşıyorum
Kod, ESP sistemlerinde görsel farkındalığı artırmak için geliştirilmiştir ve oldukça optimize bir şekilde yazılmıştır.
Basitçe söylemek gerekirse; bu kod, oyuncunun kafasının üstünde koni şeklinde bir şapka oluşturmamızı sağlar.

Kod eğitim ve öğrenme amaçlıdır, hile yazıyorsanız ekstra özellik olarak ekliyebilirsiniz keyifli kullanımlar :)
  • Dil: C++ / ImGui
  • Sonuç: Oyuncunun kafasında ChinaHat yani koniye benzeyen bir şapka oluşturur
  • Yapı: 3D koordinatları ekrana dönüştürür, ardından “WorldToScreen” fonksiyonu ile 2D çizim yapar



  • C++:
    if (ChinaHat)
            {
                ImU32 hatColor = IM_COL32(
                    static_cast<int>(Options::ESP::Color[0] * 255.f),
                    static_cast<int>(Options::ESP::Color[1] * 255.f),
                    static_cast<int>(Options::ESP::Color[2] * 255.f),
                    255
                );
    
                float h= 1.2f;
                float r= 1.6f;
                float o= 0.6f;
    
                Vectors::Vector3 headPos = player.Head.Position() + Vectors::Vector3{ 0.f, headOffset, 0.f };
    
                std::vector<Vectors::Vector3> basePoints;
                int segments = 264;
                for (int i = 0; i < segments; i++)
                {
                    float angle = (2 * 3.14159265f / segments) * i;
                    float x = headPos.x + cosf(angle) * r;
                    float z = headPos.z + sinf(angle) * r;
                    basePoints.push_back({ x, headPos.y, z });
                }
    
                auto apex3D = headPos + Vectors::Vector3{ 0.f, h, 0.f };
    
                auto apex2D = WorldToScreen(apex3D);
                for (auto& pt : basePoints)
                {
                    auto base2D = WorldToScreen(pt);
                    if (apex2D.x != -1 && base2D.x != -1)
                        drawList->AddLine(ImVec2(apex2D.x, apex2D.y), ImVec2(base2D.x, base2D.y), hatColor, 1.5f);
                }
    
    
                for (int i = 0; i < segments; i++)
                {
                    auto a = WorldToScreen(basePoints[i]);
                    auto b = WorldToScreen(basePoints[(i + 1) % segments]);
                    if (a.x != -1 && b.x != -1)
                        drawList->AddLine(ImVec2(a.x, a.y), ImVec2(b.x, b.y), hatColor, 1.5f);
                }
            }


Eline sağlık hocam
 
elinize saglık hocam aldıgınız yeriğn dc sini verme şansınız varmıdır ?
 
Selam CheatGlobal üyeleri 👋


Bugün sizlerle ImGui tabanlı “China Hat” Source Kodunu paylaşıyorum
Kod, ESP sistemlerinde görsel farkındalığı artırmak için geliştirilmiştir ve oldukça optimize bir şekilde yazılmıştır.
Basitçe söylemek gerekirse; bu kod, oyuncunun kafasının üstünde koni şeklinde bir şapka oluşturmamızı sağlar.

Kod eğitim ve öğrenme amaçlıdır, hile yazıyorsanız ekstra özellik olarak ekliyebilirsiniz keyifli kullanımlar :)
  • Dil: C++ / ImGui
  • Sonuç: Oyuncunun kafasında ChinaHat yani koniye benzeyen bir şapka oluşturur
  • Yapı: 3D koordinatları ekrana dönüştürür, ardından “WorldToScreen” fonksiyonu ile 2D çizim yapar



  • C++:
    if (ChinaHat)
            {
                ImU32 hatColor = IM_COL32(
                    static_cast<int>(Options::ESP::Color[0] * 255.f),
                    static_cast<int>(Options::ESP::Color[1] * 255.f),
                    static_cast<int>(Options::ESP::Color[2] * 255.f),
                    255
                );
    
                float h= 1.2f;
                float r= 1.6f;
                float o= 0.6f;
    
                Vectors::Vector3 headPos = player.Head.Position() + Vectors::Vector3{ 0.f, headOffset, 0.f };
    
                std::vector<Vectors::Vector3> basePoints;
                int segments = 264;
                for (int i = 0; i < segments; i++)
                {
                    float angle = (2 * 3.14159265f / segments) * i;
                    float x = headPos.x + cosf(angle) * r;
                    float z = headPos.z + sinf(angle) * r;
                    basePoints.push_back({ x, headPos.y, z });
                }
    
                auto apex3D = headPos + Vectors::Vector3{ 0.f, h, 0.f };
    
                auto apex2D = WorldToScreen(apex3D);
                for (auto& pt : basePoints)
                {
                    auto base2D = WorldToScreen(pt);
                    if (apex2D.x != -1 && base2D.x != -1)
                        drawList->AddLine(ImVec2(apex2D.x, apex2D.y), ImVec2(base2D.x, base2D.y), hatColor, 1.5f);
                }
    
    
                for (int i = 0; i < segments; i++)
                {
                    auto a = WorldToScreen(basePoints[i]);
                    auto b = WorldToScreen(basePoints[(i + 1) % segments]);
                    if (a.x != -1 && b.x != -1)
                        drawList->AddLine(ImVec2(a.x, a.y), ImVec2(b.x, b.y), hatColor, 1.5f);
                }
            }


Gardaş bi Credit vereydin bari
 
Selam CheatGlobal üyeleri 👋


Bugün sizlerle ImGui tabanlı “China Hat” Source Kodunu paylaşıyorum
Kod, ESP sistemlerinde görsel farkındalığı artırmak için geliştirilmiştir ve oldukça optimize bir şekilde yazılmıştır.
Basitçe söylemek gerekirse; bu kod, oyuncunun kafasının üstünde koni şeklinde bir şapka oluşturmamızı sağlar.

Kod eğitim ve öğrenme amaçlıdır, hile yazıyorsanız ekstra özellik olarak ekliyebilirsiniz keyifli kullanımlar :)
  • Dil: C++ / ImGui
  • Sonuç: Oyuncunun kafasında ChinaHat yani koniye benzeyen bir şapka oluşturur
  • Yapı: 3D koordinatları ekrana dönüştürür, ardından “WorldToScreen” fonksiyonu ile 2D çizim yapar



  • C++:
    if (ChinaHat)
            {
                ImU32 hatColor = IM_COL32(
                    static_cast<int>(Options::ESP::Color[0] * 255.f),
                    static_cast<int>(Options::ESP::Color[1] * 255.f),
                    static_cast<int>(Options::ESP::Color[2] * 255.f),
                    255
                );
    
                float h= 1.2f;
                float r= 1.6f;
                float o= 0.6f;
    
                Vectors::Vector3 headPos = player.Head.Position() + Vectors::Vector3{ 0.f, headOffset, 0.f };
    
                std::vector<Vectors::Vector3> basePoints;
                int segments = 264;
                for (int i = 0; i < segments; i++)
                {
                    float angle = (2 * 3.14159265f / segments) * i;
                    float x = headPos.x + cosf(angle) * r;
                    float z = headPos.z + sinf(angle) * r;
                    basePoints.push_back({ x, headPos.y, z });
                }
    
                auto apex3D = headPos + Vectors::Vector3{ 0.f, h, 0.f };
    
                auto apex2D = WorldToScreen(apex3D);
                for (auto& pt : basePoints)
                {
                    auto base2D = WorldToScreen(pt);
                    if (apex2D.x != -1 && base2D.x != -1)
                        drawList->AddLine(ImVec2(apex2D.x, apex2D.y), ImVec2(base2D.x, base2D.y), hatColor, 1.5f);
                }
    
    
                for (int i = 0; i < segments; i++)
                {
                    auto a = WorldToScreen(basePoints[i]);
                    auto b = WorldToScreen(basePoints[(i + 1) % segments]);
                    if (a.x != -1 && b.x != -1)
                        drawList->AddLine(ImVec2(a.x, a.y), ImVec2(b.x, b.y), hatColor, 1.5f);
                }
            }


espyide ekliyor mu yoksa sadecec şapka mı ekliyor
 

Şuanda konuyu görüntüleyen kullanıcılar

Geri
Üst Alt