Hey guys.
Im trying to make a controllable hotkey.
Say with speedhack, Each time the hotkey is pressed/held it will add/subtract a value from the origional PushToConsole.
How would i do this?
I have tried to do it like this, But its not working. Can anyone help me please?
[php]
int XPos = 200;
char PushX[20];
if(GetAsyncKeyState(VK_NUMPAD1)&1)
{
XPos = XPos - 100;
sprintf(PushX,"MyCommad %d", XPos);
Push(PushX);
}
[/php]
Help appreciated.
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
ac1d_buRn (08-05-2010)
btw remeber between the console command and the value put a space befor ending quotesCode:if(GetAsyncKeyState(VK_F1)&1){ if(SPEED == 100){ SPEED = 0; } else{ SPEED+= 10; } } if(Speehack){ PushToConsole("speed "+SPEED);// i know speed isnt the actual command but yeah }
and you can change the value of SPEED to a float so that its the actual value
hope it helps!
dont use < 0 it makes it go fast use that for holding a button down other wise use &1
ac1d_buRn (08-05-2010),GodHack2 (08-04-2010),jonnyboy9985 (08-09-2010)
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
Thanks guys. Ill test this out later.
i have a completly working but different way
add the vars
and this is the hotkey partCode:int speeda = 70; int speedb = 285; int speedc = 285; int speedd = 285;
works perfect for what ur after i thinkCode://speed //Left{-1}/Right{+1}/end{Default} char speeder[255]; if(GetAsyncKeyState(VK_END)<0){ speeda = 70; speedb = 285; speedc = 285; speedd = 285; } if(GetAsyncKeyState(VK_LEFT)<0){ speeda = speeda - 50; speedb = speedb - 50; speedc = speedc - 50; speedd = speedd - 50; } if(GetAsyncKeyState(VK_RIGHT)<0){ speeda = speeda + 50; speedb = speedb + 50; speedc = speedc + 50; speedd = speedd + 50; } sprintf(speeder,"WalkVel %d",speeda); PTC(speeder); sprintf(speeder,"FRunVel %d",speedb); PTC(speeder); sprintf(speeder,"BRunVel %d",speedc); PTC(speeder); sprintf(speeder,"SRunVel %d",speedd); PTC(speeder); Sleep(50);
im not sure about the held down part tho
i never tried holding down my hotkeys
but its worth a shot
i also have this for virtual jump if you want that
but if i find out u use my code with out credits i will hurt ur computer jk
but for reals give credits if u use
Last edited by tahha; 08-05-2010 at 12:57 PM.
@ zoom
where the do come from...its like r not here one day then like a day later the entire section is clean and modded lol
oh kool and sorry i will vm.
i forgot that was there lol
i havent been on mpgh in a while.
tnx goods code
I CAN GO ALL DAY NIG.
tnxs good code