- Yasaklandı
- #1
Banlı Üye
Konuya geçmeden önce kullandığım Internal-Overlay :
ve objeleri tekrar tekrar oluşturmak gibi saçma bir kod yazılmamış overlay'de...
Bu overlayi kullanacak kişiler dllmain'e CreateThread ile WinMain'i çağırmalısınız aynı bu şekilde;
Klasik vector yapılarım
Reverselediğim refdef yapısı
WorldToScreen Call Of Duty oyunları için;
cDirectX.cpp Render fonksiyon içi asıl işlevin gerçekleştiği kod
Diğer .h ve .cpp dosyalarını buraya atmıyorum attığım linkden ulaşabilirsiniz
tam kod hali için :
Dostlar beklemede kalın D3D9 EndScene hook atıp çizim yaptığım projeyide yakında paylaşıcam flicker farkını bu sayede görebilceksiniz.
Internal-Overlay kullanmak birazcık aptallık ancak göstermek amaçlı kullandım
Bağlantıları görmek için lütfen
Giriş Yap
(Sonuçta amerikayı yeniden keşfetmeye gerek yok)ve objeleri tekrar tekrar oluşturmak gibi saçma bir kod yazılmamış overlay'de...
Bu overlayi kullanacak kişiler dllmain'e CreateThread ile WinMain'i çağırmalısınız aynı bu şekilde;
C++:
BOOL APIENTRY DllMain(HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
{
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)WinMain, 0, 0, 0);
}
return TRUE;
}
Klasik vector yapılarım
C++:
#pragma once
struct Vector4
{
float x, y, z, w;
};
struct Vector3
{
float x, y, z;
};
struct Vector2
{
float x, y;
};
Reverselediğim refdef yapısı
C++:
#pragma once
#include "vector.h"
class Refdef
{
public:
uint32_t x; //0x0000
uint32_t y; //0x0004
uint32_t width; //0x0008
uint32_t height; //0x000C
Vector2 Fov; //0x0010
float Full_Fov; //0x0018
Vector3 Origin; //0x001C
char pad_0028[4]; //0x0028
Vector3 Matrix[3]; //0x002C
Vector2 Origin2; //0x0050
char pad_0058[4]; //0x0058
uint32_t client_time; //0x005C
char pad_0060[1044]; //0x0060
}; //Size: 0x0474
inline Refdef* refdef = (Refdef*)0x3520338;
WorldToScreen Call Of Duty oyunları için;
C++:
Vector3 Subtract(Vector3 src, Vector3 dst)
{
Vector3 diff;
diff.x = src.x - dst.x;
diff.y = src.y - dst.y;
diff.z = src.z - dst.z;
return diff;
}
float DotProduct(Vector3 src, Vector3 dst)
{
return src.x * dst.x + src.y * dst.y + src.z * dst.z;
}
bool WorldToScreen(Vector3 world, Vector2& screen)
{
auto Position = Subtract(world, refdef->Origin);
Vector3 Transform;
// get our dot products from viewAxis
Transform.x = DotProduct(Position, refdef->Matrix[1]);
Transform.y = DotProduct(Position, refdef->Matrix[2]);
Transform.z = DotProduct(Position, refdef->Matrix[0]);
// make sure it is in front of us
if (Transform.z < 0.1f)
return false;
// get the center of the screen
//Vector2 Center = Vector2((float)refdef->width * 0.5f,(float)refdef->height * 0.5f);
Vector2 Center;
Center.x = (float)(refdef->width * 0.5f);
Center.y = (float)(refdef->height * 0.5f);
screen.x = Center.x * (1 - (Transform.x / refdef->Fov.x / Transform.z));
screen.y = Center.y * (1 - (Transform.y / refdef->Fov.y / Transform.z));
return true;
}
cDirectX.cpp Render fonksiyon içi asıl işlevin gerçekleştiği kod
C++:
for (int i = 0; i < 16; ++i) {
// deference olarak iletmeniz gerek. gidip düz iletmeyin adresi
uintptr_t ent = *(uintptr_t*)(0x18E73C0 + (i * 0x88));
if (!ent) // klasik check
continue;
int health = *(int*)(ent + 0x1C8);
if (health > 0)
std::cout << "all zombies health :" << health << std::endl;
Vector3 x_position = *(Vector3*)(ent + 0x18); // ayak pozisyonu
Vector3 head_pos = *(Vector3*)(ent + 0x154); // kafa pozisyonu
Vector2 screen;
Vector2 screen_v2;
if (WorldToScreen(x_position, screen)) {
if (WorldToScreen(head_pos, screen_v2))
{
// azcık matematik
float head = screen_v2.y - screen.y;
float width = head / 2;
float center = width / -2;
float extra = head / -6;
DrawBox(screen.x + center, screen.y + center, width, head - extra, 25, 90, 60, 250, 90);
}
if (!health)
continue;
}
system("cls");
}
Diğer .h ve .cpp dosyalarını buraya atmıyorum attığım linkden ulaşabilirsiniz
tam kod hali için :
Bağlantıları görmek için lütfen
Giriş Yap
Dostlar beklemede kalın D3D9 EndScene hook atıp çizim yaptığım projeyide yakında paylaşıcam flicker farkını bu sayede görebilceksiniz.
Internal-Overlay kullanmak birazcık aptallık ancak göstermek amaçlı kullandım
Bağlantıları görmek için lütfen
Giriş Yap
Moderatörün son düzenlenenleri: