CPP RELEASE [TUTORIAL] - Add ImGui Into your s0beit

_=Gigant=_

Well-known member
Joined
Mar 21, 2017
Messages
353
Reaction score
16
// ImGui Rendering in s0beit tutorial

1. add files down below into your sobeit
- imconig.h
- imgui.cpp
- imgui.h
- imgui_demo.cpp
- imgui_draw.cpp
- imgui_impl_dx9.cpp
- imgui_impl_dx9.h
- imgui_impl_win32.cpp
- imgui_impl_win32.h
- imgui_internal.h
- imgui_widgets.cpp
- imstb_rectpack.h
- imstb_textedit.h
- imstb_truetype.h

you can download them from here http://www.mediafire.com/file/lsxh8n08jn3z81a/imgui.rar/file

2. and include this in your main.h

#include "imgui.h"
#include "imgui_impl_dx9.h"
#include "imgui_impl_win32.h"
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#include <tchar.h>
#include <d3d9.h>
extern LRESULT ImGui_ImplWin32_WndProcHandler(HWND wnd, UINT umsg, WPARAM wparam, LPARAM lparam);

3. Rendering: after you include everything in your project now you can start to initialize imgui

go to proxyIDirect3DDevice9.cpp and in there first find void proxyID3DDevice9_UnInitOurShit(void)
in there put ImGui_ImplDX9_InvalidateDeviceObjects(); after render->Invalidate();
now find renderHandler(); and in there put

ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO();
ImGuiStyle& style = ImGui::GetStyle();
io.IniFilename = NULL;
io.DeltaTime = 1.0f / 60.0f;
ImFont* pFont = io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\framd.ttf", 15);
SetCursor(io.MouseDrawCursor ? NULL : LoadCursor(NULL, IDC_ARROW));
io.Fonts->AddFontDefault();
style.AntiAliasedLines = false;
style.AntiAliasedFill = false;
style.WindowBorderSize = 0.0f;
ImGui_ImplWin32_Init(GetActiveWindow());
ImGui_ImplDX9_Init(pPresentParam.hDeviceWindow, origIDirect3DDevice9);

before proxyIDirect3DDevice9_init = 1;

then go to keyhook.cpp and find
static LRESULT CALLBACK wnd_proc(HWND wnd, UINT umsg, WPARAM wparam, LPARAM lparam)

there put ImGui_ImplWin32_WndProcHandler(wnd, umsg, wparam, lparam);


4. after you initialized your imgui into sobeit now lets draw menu

C++:
void Theme()  // this is my custom theme you can put yours
{
    ImGuiStyle& style = ImGui::GetStyle();
    ImVec4* colors = ImGui::GetStyle().Colors;
    style.WindowTitleAlign = ImVec2(0.5f, 0.5f);
    colors[ImGuiCol_Text] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
    colors[ImGuiCol_TextDisabled] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
    colors[ImGuiCol_WindowBg] = ImColor(24, 24, 24);
    colors[ImGuiCol_ChildBg] = ImVec4(1.00f, 1.00f, 1.00f, 0.00f);
    colors[ImGuiCol_PopupBg] = ImVec4(0.08f, 0.08f, 0.08f, 0.94f);
    colors[ImGuiCol_Border] = ImColor(0, 0, 0);
    colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
    colors[ImGuiCol_FrameBg] = ImVec4(0.16f, 0.29f, 0.48f, 0.54f);
    colors[ImGuiCol_FrameBgHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.40f);
    colors[ImGuiCol_FrameBgActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.67f);
    colors[ImGuiCol_TitleBg] = ImColor(0, 0, 0);
    colors[ImGuiCol_TitleBgActive] = ImColor(0, 0, 0);
    colors[ImGuiCol_TitleBgCollapsed] = ImColor(0, 0, 0);
    colors[ImGuiCol_MenuBarBg] = ImVec4(0.14f, 0.14f, 0.14f, 1.00f);
    colors[ImGuiCol_ScrollbarBg] = ImVec4(0.02f, 0.02f, 0.02f, 0.53f);
    colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.31f, 0.31f, 0.31f, 1.00f);
    colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
    colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.51f, 0.51f, 0.51f, 1.00f);
    colors[ImGuiCol_CheckMark] = ImColor(10, 188, 7);
    colors[ImGuiCol_SliderGrab] = ImColor(25, 165, 6);
    colors[ImGuiCol_SliderGrabActive] = ImColor(25, 165, 6);
    colors[ImGuiCol_Button] = ImColor(196, 54, 7);
    colors[ImGuiCol_ButtonHovered] = ImColor(193, 9, 9);
    colors[ImGuiCol_ButtonActive] = ImColor(193, 135, 0);
    colors[ImGuiCol_Header] = ImColor(41, 2, 2);
    colors[ImGuiCol_HeaderHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.80f);
    colors[ImGuiCol_HeaderActive] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
    colors[ImGuiCol_Separator] = ImColor(0, 0, 0);
    colors[ImGuiCol_SeparatorHovered] = ImColor(0, 0, 0);
    colors[ImGuiCol_SeparatorActive] = ImColor(0, 0, 0);
    colors[ImGuiCol_ResizeGrip] = ImColor(0, 0, 0);
    colors[ImGuiCol_ResizeGripHovered] = ImColor(0, 0, 0);
    colors[ImGuiCol_ResizeGripActive] = ImColor(0, 0, 0);
    colors[ImGuiCol_PlotLines] = ImVec4(0.61f, 0.61f, 0.61f, 1.00f);
    colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
    colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
    colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
    colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
    colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
    colors[ImGuiCol_NavHighlight] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
    colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
    colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
    colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);

    style.WindowPadding = ImVec2(15, 15);
    style.WindowRounding = 5.0f;
    style.ItemSpacing = ImVec2(12, 8);
    style.ItemInnerSpacing = ImVec2(8, 6);
    style.IndentSpacing = 25.0f;
    style.ScrollbarSize = 15.0f;
    style.ScrollbarRounding = 9.0f;
}

void RenderImgui()
{

    static bool activew = true;
    static bool bDemo = false;
    static bool bFunction1 = false;
    static bool bFunction2 = false;
    static bool bFunction3 = false;


    ImGui_ImplDX9_NewFrame();
    ImGui_ImplWin32_NewFrame();

    if (activew)
    {
        ImGui::SetNextWindowSize(ImVec2(700, 400));

        ImGui::Begin("ImGui меню", &activew, ImVec2(305, 160), 0.8f, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoResize);
        {

            ImGui::Checkbox("Show Imgui Demo Window", &bDemo);

            if(bDemo)
            {     
              ImGui::ShowDemoWindow();
            }

            ImGui::Checkbox("My Cheat 1", &bFunction1);
            ImGui::Checkbox("My Cheat 2", &bFunction2);
            ImGui::Checkbox("My Cheat 3", &bFunction3);
        }
        ImGui::End();
    }

    ImGui::EndFrame();
    ImGui::Render();
    ImGui_ImplDX9_RenderDrawLists(ImGui::GetDrawData());

}

after you put this code into your project now lets include it

go to renderHandler again and put RenderImgui(); under renderSamp();

and put Theme(); before proxyIDirect3DDevice9_init = 1;

5. now compile and test in game, since sobeit menu is kinda old you can create awesome looking cheats with imgui without using some hooks and defining all again sobeit has everything

preview
 

Attachments

  • sa-mp-338.png
    sa-mp-338.png
    187 KB · Views: 693
Last edited:

_=Gigant=_

Well-known member
Joined
Mar 21, 2017
Messages
353
Reaction score
16
more cool theme for imgui cheat

C++:
    ImGuiStyle * style = &ImGui::GetStyle();

    style->WindowPadding = ImVec2(15, 15);
    style->WindowRounding = 5.0f;
    style->FramePadding = ImVec2(5, 5);
    style->FrameRounding = 4.0f;
    style->ItemSpacing = ImVec2(12, 8);
    style->ItemInnerSpacing = ImVec2(8, 6);
    style->IndentSpacing = 25.0f;
    style->ScrollbarSize = 15.0f;
    style->ScrollbarRounding = 9.0f;
    style->GrabMinSize = 5.0f;
    style->GrabRounding = 3.0f;

    style->Colors[ImGuiCol_Text] = ImVec4(0.80f, 0.80f, 0.83f, 1.00f);
    style->Colors[ImGuiCol_TextDisabled] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
    style->Colors[ImGuiCol_WindowBg] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
    style->Colors[ImGuiCol_ChildWindowBg] = ImVec4(0.07f, 0.07f, 0.09f, 1.00f);
    style->Colors[ImGuiCol_PopupBg] = ImVec4(0.07f, 0.07f, 0.09f, 1.00f);
    style->Colors[ImGuiCol_Border] = ImVec4(0.80f, 0.80f, 0.83f, 0.88f);
    style->Colors[ImGuiCol_BorderShadow] = ImVec4(0.92f, 0.91f, 0.88f, 0.00f);
    style->Colors[ImGuiCol_FrameBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
    style->Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
    style->Colors[ImGuiCol_FrameBgActive] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
    style->Colors[ImGuiCol_TitleBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
    style->Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(1.00f, 0.98f, 0.95f, 0.75f);
    style->Colors[ImGuiCol_TitleBgActive] = ImVec4(0.07f, 0.07f, 0.09f, 1.00f);
    style->Colors[ImGuiCol_MenuBarBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
    style->Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
    style->Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f);
    style->Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
    style->Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
    //style->Colors[ImGuiCol_ComboBg] = ImVec4(0.19f, 0.18f, 0.21f, 1.00f);
    style->Colors[ImGuiCol_CheckMark] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f);
    style->Colors[ImGuiCol_SliderGrab] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f);
    style->Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
    style->Colors[ImGuiCol_Button] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
    style->Colors[ImGuiCol_ButtonHovered] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
    style->Colors[ImGuiCol_ButtonActive] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
    style->Colors[ImGuiCol_Header] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
    style->Colors[ImGuiCol_HeaderHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
    style->Colors[ImGuiCol_HeaderActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
    style->Colors[ImGuiCol_Column] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
    style->Colors[ImGuiCol_ColumnHovered] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
    style->Colors[ImGuiCol_ColumnActive] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
    style->Colors[ImGuiCol_ResizeGrip] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
    style->Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
    style->Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
    //style->Colors[ImGuiCol_CloseButton] = ImVec4(0.40f, 0.39f, 0.38f, 0.16f);
    //style->Colors[ImGuiCol_CloseButtonHovered] = ImVec4(0.40f, 0.39f, 0.38f, 0.39f);
    //style->Colors[ImGuiCol_CloseButtonActive] = ImVec4(0.40f, 0.39f, 0.38f, 1.00f);
    style->Colors[ImGuiCol_PlotLines] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f);
    style->Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
    style->Colors[ImGuiCol_PlotHistogram] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f);
    style->Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
    style->Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.25f, 1.00f, 0.00f, 0.43f);
    style->Colors[ImGuiCol_ModalWindowDarkening] = ImVec4(1.00f, 0.98f, 0.95f, 0.73f);

preview
 

Attachments

  • cool theme.png
    cool theme.png
    49.3 KB · Views: 277

_=Gigant=_

Well-known member
Joined
Mar 21, 2017
Messages
353
Reaction score
16
Not working

that's because you didn't downloaded imgui files from the link which i posted in the first post in this thread
and since you're using offensive language here in this thread i bet you're just some random troller like user88 else you would probably ask for help or post picture of the problem you get so we can try to solve it but whatever just don't post fake information about this "its not working" and that stuff because you can clearly see in picture i posted above that it is working just fine and even the dumbest human on this world would know how to include imgui from the tutorial i posted above

0 downloads on imgui files link which i posted in the first post, next time try to troll better
 

Attachments

  • Screenshot_1.jpg
    Screenshot_1.jpg
    7.4 KB · Views: 105
Last edited:
D

Deleted member 34507

Guest
Hmmmmmmmmmmmmm maybe I can create RainBow s0b? nice tutorial! xD
 

Scraatch

Active member
Joined
Jan 14, 2017
Messages
76
Reaction score
2
Location
Germany
Whats the problem here?
they cant get opened
 

Attachments

  • komisch.PNG
    komisch.PNG
    133.5 KB · Views: 135

Scraatch

Active member
Joined
Jan 14, 2017
Messages
76
Reaction score
2
Location
Germany
i fixed it but i want to use it in my dll and not in a s0beit

//EDIT: and i have not the file proxyIDirect3DDevice9.cpp to initialize
 

Blume

Active member
Joined
May 14, 2018
Messages
38
Reaction score
11
Location
China
why i got ERROR LNK2019?
Code:
1>proxyIDirect3DDevice9.obj : error LNK2019: Unresolved external symbol "struct ImGuiContext * __cdecl ImGui::CreateContext(struct ImFontAtlas *)" (?CreateContext@ImGui@@YAPAUImGuiContext@@PAUImFontAtlas@@@Z), the symbol is in the function Referenced in "void __cdecl renderHandler(void)" (?renderHandler@@YAXXZ)
1>proxyIDirect3DDevice9.obj : error LNK2019: Unresolved external symbol "struct ImGuiIO & __cdecl ImGui::GetIO(void)" (?GetIO@ImGui@@YAAAUImGuiIO@@XZ), the symbol is in the function "void __cdecl renderHandler(void )" (??renderHandler@@YAXXZ) is referenced
1>proxyIDirect3DDevice9.obj : error LNK2019: Unresolved external symbol "struct ImGuiStyle & __cdecl ImGui::GetStyle(void)" (?GetStyle@ImGui@@YAAAUImGuiStyle@@XZ), the symbol is in the function "void __cdecl renderHandler(void )" (??renderHandler@@YAXXZ) is referenced
1> proxyIDirect3DDevice9.obj: error LNK2019: unresolved external symbol "public: struct ImFont * __thiscall ImFontAtlas :: AddFontDefault (struct ImFontConfig const *)" (AddFontDefault @ ImFontAtlas @@ QAEPAUImFont @@ PBUImFontConfig @@@ Z?), The The symbol is referenced in the function "void __cdecl renderHandler(void)" (?renderHandler@@YAXXZ)
1> proxyIDirect3DDevice9.obj: error LNK2019: unresolved external symbol "public: struct ImFont * __thiscall ImFontAtlas :: AddFontFromFileTTF (char const *, float, struct ImFontConfig const *, unsigned short const *)" (AddFontFromFileTTF @ ImFontAtlas @@? QAEPAUImFont@@PBDMPBUImFontConfig@@PBG@Z), the symbol is referenced in the function "void __cdecl renderHandler(void)" (?renderHandler@@YAXXZ)
1> proxyIDirect3DDevice9.obj: error LNK2019: unresolved external symbol "bool __cdecl ImGui_ImplDX9_Init (void *, struct IDirect3DDevice9 *)" (? ImGui_ImplDX9_Init @@ YA_NPAXPAUIDirect3DDevice9 @@@ Z), the symbol in the function "void __cdecl renderHandler (void) Quoted in (??renderHandler@@YAXXZ)
1> proxyIDirect3DDevice9.obj: error LNK2019: unresolved external symbol "void __cdecl ImGui_ImplDX9_InvalidateDeviceObjects (void)" (ImGui_ImplDX9_InvalidateDeviceObjects @@ YAXXZ?), The symbol in the function "public: virtual long __stdcall proxyIDirect3DDevice9 :: Reset (struct _D3DPRESENT_PARAMETERS_ *)" Quoted in (?Reset@proxyIDirect3DDevice9@@UAGJPAU_D3DPRESENT_PARAMETERS_@@@Z)
1>proxyIDirect3DDevice9.obj : error LNK2019: Unresolved external symbol "bool __cdecl ImGui_ImplWin32_Init(void *)" (?ImGui_ImplWin32_Init@@YA_NPAX@Z), the symbol is in the function "void __cdecl renderHandler(void)" (?renderHandler@@ Cited in YAXXZ)
 
Top