Selamat Datang Di Blog Saya Dan Jangan Lupa Bergabung di forum Saya www.cwhg-net.co.cc

Kamis, 01 September 2011

Tutorial Dll Crossfire

Posted by Singkep Komunitas [SK] 9/01/2011 11:05:00 PM, under | No comments

Tutorial Membuat Dll Crosshair For Game

Tool Yang Perlu Di Siapkan

(*) Visual Studio 2008


Step 1

* Jalankan Program Vc 2008

* Tekan Ctrl+Shif+N

Pilih Visual C++ Empty Project

Cotoh Gambar Step 1


Resized to 72% (was 683 x 465) - Click image to enlargePosted Image


Dan Namakan Project Anda Contoh (Rose Crosshair)

Step 2

* Klik Kanan Pada Project Yang Kita Namakan

* Klik Add => New Item => Pilih C++ File(.cpp) Kasih Nama (Main.cpp)
Step 3

Isikan Code Di bawah ini Pada Main.cpp

Spoiler
////////////Geetz To MPGH.net/////////////////////
////////////© 2010 By KiraF4///////////////////
////////////Membuat Dll Crosshair For Game//////
////////////Nyit-Nyit.net////////////////////
#include <windows.h>
#include <iostream>
#include <math.h>
using namespace std;

bool crosshairon=false;
HDC ragedc = NULL;
int crosshairsize=0;
int cx=0;
int cy=0;

void CrossThread(void)
{
while(1)
{
if(GetAsyncKeyState(VK_NUMPAD0)&1)
{
crosshairon=!crosshairon;
ragedc = GetDC(HWND_DESKTOP);
cx=GetSystemMetrics(SM_CXSCREEN)/2-((crosshairsize-1)/2);
cy=GetSystemMetrics(SM_CYSCREEN)/2-((crosshairsize-1)/2);
}
Sleep(1);
}
}

int main()
{
cout<<"crosshari Buatan Abang KiraF4:\n";
cin>>crosshairsize;
if(crosshairsize%2==0) //check if its even
{
crosshairsize+=1; //if it is add 1
}
system("cls"); // clear the console :)
cout<<"Hotkey numpad0 untuk sistem on & off\n";
CreateThread(0,0,(LPTHREAD_START_ROUTINE)CrossThread,0,0,0);
while(1)
{
if(crosshairon==true)
{
for(int i=0;i<crosshairsize;i++)
{
SetPixel(ragedc, cx+i, cy+((crosshairsize-1)/2), RGB(255,0,0));
SetPixel(ragedc, cx+((crosshairsize-1)/2), cy+i, RGB(255,0,0));
}
}
Sleep(1);
}
}


Tata Letak Tempat Crosshair Akan Muncul
Spoiler
crosshairon=!crosshairon;
ragedc = GetDC(HWND_DESKTOP);
cx=GetSystemMetrics(SM_CXSCREEN)/2-((crosshairsize-1)/2);
cy=GetSystemMetrics(SM_CYSCREEN)/2-((crosshairsize-1)/2);

Edit Bagian Yg angka 2

Mempebesar Crosshair
Spoiler

edit angka 1 sesukamu

Setting Untuk Menganti Warna Crosshair
Spoiler
SetPixel(ragedc, cx+i, cy+((crosshairsize-1)/2), RGB(255,0,0));
SetPixel(ragedc, cx+((crosshairsize-1)/2), cy+i, RGB(255,0,0));

Edit Bagian 255,0,0 Untuk Warna

Sistem hotkeyz
Spoiler
Sistem Hotkey
Saya Mengunakan Sistem On Off

NUMPAD 0 ON & OFF


Step 4

* Klik Kanan Pada Project => Klik Propetis Dan Rubah exe To Dll


* Ubah Application Exe Menjadi Dynamic Dll

Dan Liat Hasi Buiilnya

Happy Ending

Credit : Rara sukatoro


0 komentar:

Posting Komentar

Tags

Blog Archive