Исходник .jpg from pc to your p100 menu [dx9]

Пользователь
Статус
Оффлайн
Регистрация
3 Янв 2020
Сообщения
83
Реакции[?]
102
Поинты[?]
6K
add wherever you want

Plz yous your brain and understand this code benefits compared to byte if u just want to use a background image like skeet use byte if u wanna do paid level crap like per user image etc use this
C++:
PDIRECT3DTEXTURE9 my_texture = NULL;

#include <D3dx9tex.h>
#pragma comment(lib, "D3dx9")

// Simple helper function to load an image into a DX9 texture with common settings
bool LoadTextureFromFile(const char* filename, PDIRECT3DTEXTURE9* out_texture, int* out_width, int* out_height)
{
    // Load texture from disk
    PDIRECT3DTEXTURE9 texture;
    HRESULT hr = D3DXCreateTextureFromFileA(g_pd3dDevice, filename, &texture);
    if (hr != S_OK)
        return false;

    // Retrieve description of the texture surface so we can access its size
    D3DSURFACE_DESC my_image_desc;
    texture->GetLevelDesc(0, &my_image_desc);
    *out_texture = texture;
    *out_width = (int)my_image_desc.Width;
    *out_height = (int)my_image_desc.Height;
    return true;
}
add in your present /endscene hook
C++:
int my_image_width = 0;
int my_image_height = 0;
bool ret = LoadTextureFromFile("you file location / filename.jpg", &my_texture, &my_image_width, &my_image_height);
IM_ASSERT(ret);
add in your menu
C++:
ImGui::Image((void*)my_texture, ImVec2(my_image_width, my_image_height));
u can also use
C++:
window->DrawList->AddImage(void*)my_texture, ImVec2(window->Pos + ImVec2(70, 70)), ImVec2(window->Pos.x + window->Size.x, window->Pos.y + window->Size.y), ImVec2(0, 0), ImVec2(1, 1), ImColor(1.f, 1.f, 1.f));
 
Последнее редактирование:
I'm watching you
Участник
Статус
Оффлайн
Регистрация
7 Фев 2020
Сообщения
752
Реакции[?]
241
Поинты[?]
3K
Ожидается увеличение НН паст с хуёвыми лого в меню?
 
Пользователь
Статус
Оффлайн
Регистрация
3 Янв 2020
Сообщения
83
Реакции[?]
102
Поинты[?]
6K
if u wanna change the menu image u have to convert the image, again and again, etc also if u wanna share with your friends and they want a different image and u can even use it for per user profile pic etc and u don't have to worry about settings some crap per image to
 
Участник
Статус
Оффлайн
Регистрация
26 Мар 2019
Сообщения
707
Реакции[?]
167
Поинты[?]
1K
add wherever you want
C++:
PDIRECT3DTEXTURE9 my_texture = NULL;

#include <D3dx9tex.h>
#pragma comment(lib, "D3dx9")

// Simple helper function to load an image into a DX9 texture with common settings
bool LoadTextureFromFile(const char* filename, PDIRECT3DTEXTURE9* out_texture, int* out_width, int* out_height)
{
    // Load texture from disk
    PDIRECT3DTEXTURE9 texture;
    HRESULT hr = D3DXCreateTextureFromFileA(g_pd3dDevice, filename, &texture);
    if (hr != S_OK)
        return false;

    // Retrieve description of the texture surface so we can access its size
    D3DSURFACE_DESC my_image_desc;
    texture->GetLevelDesc(0, &my_image_desc);
    *out_texture = texture;
    *out_width = (int)my_image_desc.Width;
    *out_height = (int)my_image_desc.Height;
    return true;
}
add in your present /endscene hook
C++:
int my_image_width = 0;
int my_image_height = 0;
bool ret = LoadTextureFromFile("you file location / filename.jpg", &my_texture, &my_image_width, &my_image_height);
IM_ASSERT(ret);
add in your menu
C++:
ImGui::Image((void*)my_texture, ImVec2(my_image_width, my_image_height));
u can also use
C++:
window->DrawList->AddImage(void*)my_texture, ImVec2(window->Pos + ImVec2(70, 70)), ImVec2(window->Pos.x + window->Size.x, window->Pos.y + window->Size.y), ImVec2(0, 0), ImVec2(1, 1), ImColor(1.f, 1.f, 1.f));
Можно это сделать в 100 раз легче
 
Пользователь
Статус
Оффлайн
Регистрация
3 Янв 2020
Сообщения
83
Реакции[?]
102
Поинты[?]
6K
Can be done 100 times easier
u gonna say use byte as i said from another comment
also, byte method is better if u want to have a background image and not gonna change it
this method is better if u wanna find a cool background for your cheat or u wanna share with friends and they want a different image and so on
 
Последнее редактирование:
LEADSENSE
Начинающий
Статус
Оффлайн
Регистрация
10 Май 2018
Сообщения
146
Реакции[?]
21
Поинты[?]
0
u gonna say use byte as i said from another comment
also, byte method is better if u want to have a background image and not gonna change it
this method is better if u wanna find a cool background for your cheat or u wanna share with friends and they want a different image and so on
Can this be worked if my cheat is in cloud? for example people downloading my dll file from somewhere do they need to have the image ? if so , they also need to have it in a same path? sorry for weird questions :p
 
Пользователь
Статус
Оффлайн
Регистрация
3 Янв 2020
Сообщения
83
Реакции[?]
102
Поинты[?]
6K
Can this be worked if my cheat is in cloud? for example people downloading my dll file from somewhere do they need to have the image ? if so , they also need to have it in a same path? sorry for weird questions :p
Np if u just want to use a background image just use byte but If u wanna use stuff like per user image etc the u can use this if u wanna do what u said just make your loader download the image for that user and save it some were on there pc were u have location set
 
Пользователь
Статус
Оффлайн
Регистрация
3 Янв 2020
Сообщения
83
Реакции[?]
102
Поинты[?]
6K
Начинающий
Статус
Оффлайн
Регистрация
12 Фев 2020
Сообщения
37
Реакции[?]
9
Поинты[?]
0
I'm so confused. I'm getting my_image_width is already defined in chams.obj error. But when I look into chams.h and chams.cpp there is nothing like that defined. Why do I get this error ?

Edit : Nevermind I fixed it.

1604140376964.png
 
Последнее редактирование:
airwaves
Забаненный
Статус
Оффлайн
Регистрация
11 Апр 2020
Сообщения
21
Реакции[?]
24
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
u can use D3DXCreateSprite instead of this for non-imgui folk (tip: sprite methods)
u can also load directly from a byte array using D3DXCreateTextureFromFileInMemory
 
Сверху Снизу