make a
else
and make the normal value
for NOreload is the Normal value 1;
Hey guys i tried to make hotkey but i filed and i need ur help
i need to make F11 No reload Turned on F12 No reload Turned offCode:#include <windows.h> #define WeaponMgr 0xA68F80 #define NoReload 0x269C DWORD WINAPI Hacks(LPVOID) { bool reload = false; if(GetAsyncKeyState(VK_F11)&1){ reload = true; Beep(1000,1000);} if(GetAsyncKeyState(VK_F12)&1){ reload = false; Beep(1000,1000);} while(1) { DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll"); DWORD pWeaponMgr = *(DWORD*)(CShell + WeaponMgr); if(reload) { if (pWeaponMgr) { for(int i=0; i<560; i++) { if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) != NULL) *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) + NoReload) = 100,0; //String is "ReloadAnimRatio" } } } Sleep(100); } } bool R2H() { if ( GetModuleHandleA("CShell.dll") != NULL && GetModuleHandleA("ClientFx.fxd") != NULL ) return 1; return 0; } DWORD WINAPI W41t(LPVOID) { while ( !R2H()) Sleep(200); CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Hacks, NULL, NULL, NULL); return 0; } BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved ) { DisableThreadLibraryCalls(hDll); if ( dwReason == DLL_PROCESS_ATTACH ) { MessageBoxA(0, "blah blah blah","blah blah blah", 0); CreateThread(0,0,(LPTHREAD_START_ROUTINE)W41t,0,0, 0); } return 1; }
Please Note : This is not my base it's swiftdude one i won't share my base to keep it save from leechers hand
make a
else
and make the normal value
for NOreload is the Normal value 1;
if(GetAsyncKeyState(VK_F12) != false){
reload = !reload;}
if(reload){
if(pWeaponMgr){
for(int i = 0; i < 577; i ++){
if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i)) ) != NULL){
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) + (4*i))) + 0x269C) = (float) 100.0;
}else{
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) + (4*i))) + 0x269C) = (float) 1.0;
}
}
}
}
same problem no thing happened when i pressed f12
Here:
so ?Code:if(GetAsyncKeyState(VK_F12) !=){ reload = !reload;} if(reload){ if(pWeaponMgr){ for(int i = 0; i < 577; i ++){ if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i)) ) != NULL){ *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) + (4*i))) + 0x269C) = (float) 100.0; }else{ if(GetAsyncKeyState(VK_F11) != true){ if(reload){ if(pWeaponMgr){ for(int i = 0; i < 577; i ++){ if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i)) ) != NULL){ *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) + (4*i))) + 0x269C) = (float) 1.0; } } } }
SameCode:if(GetAsyncKeyState(VK_F11) != false){ reload = !reload;} if(reload){ if(pWeaponMgr){ for(int i = 0; i < 577; i ++){ if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) != NULL){ *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+ (4*i))) + 0x269C) = (float) 100.0; }else{ if(GetAsyncKeyState(VK_F12)&1){ if(reload){ if(pWeaponMgr){ for(int i = 0; i < 577; i ++){ if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) != NULL){ *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+ (4*i))) + 0x269C) = (float) 1.0;}} }}}}}}}
//Edit
i have also tried
but same problemCode:if (GetAsyncKeyState(VK_F11)){ if(pWeaponMgr){ for(int i = 0; i < 577; i ++){ if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) != NULL){ *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+ (4*i))) + 0x269C) = (float) 100.0; }}}} if (GetAsyncKeyState(VK_F12)){ if(pWeaponMgr){ for(int i = 0; i < 577; i ++){ if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) != NULL){ *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+ (4*i))) + 0x269C) = (float) 1.0; }}}}
Last edited by Dragon(H)ell; 01-03-2012 at 11:49 AM.
i think xtrap deletes the thread now so u have to make an menu
Lol, crossfire is killing your thread, so ur dll isn't even checking for key state since the thread that is being programmed to do so isn't in effect.
So I have to do menu or there is another way to make hotkey ?
Last edited by Brimir; 01-04-2012 at 01:19 AM.
Thanks @~FALLEN~ for helping me
Thanks @Shakai for helping me
Other nice ppl:
@258456
@giniyat101
My usefull posts:
Byte scanner
How to make a logger
Hook example
How to make a memhack base
How to use classes with memhacking
Addie finder