Hotkey

Posts 1–10 of 10 · Page 1 of 1
Hotkey
Hey guys i tried to make hotkey but i filed and i need ur help

Code:
#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;
}
i need to make F11 No reload Turned on F12 No reload Turned off

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;
Quote Originally Posted by MasterOf View Post
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
Do the Hotkeys work now?

---------- Post added at 08:54 AM ---------- Previous post was at 08:51 AM ----------

and DragonHell is right
Here:

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;
}
}
}
}
so ?
Code:
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;}}
}}}}}}}
Same

//Edit

i have also tried
Code:
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;
}}}}
but same problem
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 ?
Why the hell.. do you let your hotkey cheak run once?

And why is there no "disabled" value?

Edit:
Maby an idee to make your loop undetected :\?

Quote Originally Posted by Dragon(H)ell View Post
So I have to do menu or there is another way to make hotkey ?
Do you want to make a menu that response to the mouse? else it also needs hotkey's...
Posts 1–10 of 10 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us