PDA

View Full Version : Winchester Hack Buggy



ganglyman21
12-11-2007, 08:24 AM
Ok so after few days trawling all you guys tutorials and helps and everything got 90% of stuff working. 1 thing puzzling me now is the weapon hack.

I can make it work but in a round about way Im wondering if I've overlooked something or if thats just how it is. Anyways heres my code

switch(nIDEvent)
{
case TimerNameHere:
{
1110xD0F980,4); //5th slot
111(0x12C8520, 0x4C, 42); //shotgun
}
break;
}

void CV2Dlg::OnShottyOn()
{
SetTimer(thattimername, 1, NULL);
}

void CV2Dlg::OnShottyOff()
{
KillTimer(thattimername);
}



added 5th slot because it was crashing me without, but seeems I click "ShottyOn", go back in game roll (as in other hacks) then it holds shotty but still in punching stance, but then when I go out click "ShottyOff", go back in game roll and it works.

Have I messed something up?

(changed names of stuff so ignore that it works)

wr194t
12-11-2007, 08:28 AM
Winchester doesn't need a timer. Just put 111(0x12C8520, 0x4C, 42); in a ON button. Post your WritePointerFloat function code (111). You need to edit it slightly for a weapon hack to work correctly.

ganglyman21
12-11-2007, 08:31 AM
It's one I leeched off here somewhere but here it is;


void WritePointerFloat(long addy, short offset, float value)
{
long maddy;
long saddy;
memory();
ReadProcessMemory(hProcess, (LPVOID*)(DWORD) addy, &maddy, sizeof(maddy), NULL);
saddy = maddy + offset;
WriteProcessMemory(hProcess, (LPVOID*)(DWORD) saddy, &value, sizeof(value), NULL);
}

that right?

And do I need 5th slot or is that not important?

wr194t
12-11-2007, 08:35 AM
It's one I leeched off here somewhere but here it is;


void WritePointerFloat(long addy, short offset, float value)
{
long maddy;
long saddy;
memory();
ReadProcessMemory(hProcess, (LPVOID*)(DWORD) addy, &maddy, sizeof(maddy), NULL);
saddy = maddy + offset;
WriteProcessMemory(hProcess, (LPVOID*)(DWORD) saddy, &value, sizeof(value), NULL);
}

that right?This works for Super Jump, NFD etc, but for a weapon hack you need to change float value to long value:


void WritePointerFloat(long addy, short offset, long value)
{
long maddy;
long saddy;
memory();
ReadProcessMemory(hProcess, (LPVOID*)(DWORD) addy, &maddy, sizeof(maddy), NULL);
saddy = maddy + offset;
WriteProcessMemory(hProcess, (LPVOID*)(DWORD) saddy, &value, sizeof(value), NULL);
}

ganglyman21
12-11-2007, 08:37 AM
Ok excellent, shall try that now, remove timer, add code straing on button. will let u know if I get it going ;D

wr194t
12-11-2007, 08:39 AM
Word of advice. Copy & paste another 111 function and rename it, so you have one with float value, and one with long (float value = NFD, Super Jump long value = weapon hacks).

ganglyman21
12-11-2007, 08:44 AM
Yup set it up like that already.

Works perfectly now thanks very much still very suspect to use but so fun none the less.

wr194t
12-11-2007, 08:45 AM
I'm here to help.

man2fight
12-11-2007, 08:47 AM
i have make a winchester hack to but i cant shoot
plz help me


case WINCHESTERTIMER: //timer for WINCHESTER
{
if (GetKeyState(VK_F1)&1)
{
WritePointerFloat2(0x12C8520, 0x4C, 42);
}
}
break;

wr194t
12-11-2007, 08:50 AM
You didn't need to post your whole code, because if a K2 spy sees it, it will just get detected. Your code looks fine so I don't know what the problem is.

ganglyman21
12-11-2007, 09:06 AM
unless its the same as mine, the WritePointerLong instead of float?

Ill post my new one so u can see


void YOURTHINGHERE(long addy, short offset, long value)
{
long maddy;
long saddy;
memory();
ReadProcessMemory(hProcess, (LPVOID*)(DWORD) addy, &maddy, sizeof(maddy), NULL);
saddy = maddy + offset;
WriteProcessMemory(hProcess, (LPVOID*)(DWORD) saddy, &value, sizeof(value), NULL);
}

void CV2Dlg::BUTTONPRESSEDNAME()
{
YOURTHINGHERE(0x12C8520, 0x4C, 42); //shotgun I think?
}


this works for me 100% get fists out, alt tab click button back in game roll and bam shotty