Hello, I tried to make a quick dll
Isn't this suposed to work?
Code:while(1)
{
DWORD dwPlayerPtr = *(DWORD*)0xCCB670;
*(float*)(dwPlayerPtr+0x2C) = 60;
Sleep(500);
}
Printable View
Hello, I tried to make a quick dll
Isn't this suposed to work?
Code:while(1)
{
DWORD dwPlayerPtr = *(DWORD*)0xCCB670;
*(float*)(dwPlayerPtr+0x2C) = 60;
Sleep(500);
}
what r u asking right now? havnt u tried it?
Is a loop.Code:while(1)
{
Why are you doing a loop? If you are doing memory hacks, just do it in DIP.
this is not the right section to put this
Don't loop. Just use the "if" statement, it's enough :) But the code is wrong
Should be like this :
Code:int hack = 1;
if(hack)
{
DWORD dwPlayerPtr = *(DWORD*)0x00CCB670 ;
if(dwPlayerPtr != 0) //It check if we're ingame :D
{
*(float*)(dwPlayerPtr+0x2C) = 60;
}
}
Have fun.
Pixi.
DrawIndexedPrimitive has NOTHING to do with memory hacks.
A loop works just fine, but if I were him i'd move the DWORD a = (DWORD*)0xAAAAAAA outside the loop, for performance reasons.
No...
Using an if statement is not enough if he wants to constantly write it to memory...
Also a DWORD(which is a typedef for unsigned long) is not the same as a float.
Can somebody confirm the adresses and if this should work for WarRock, cos I can't think of anything i'm missing.
Code:#include <windows.h>
#include <stdio.h>
// DWORD *blah = (DWORD*)0x458468;
// *(int*)blah = 4;
DWORD dwPlayerPtr = *(DWORD*)0xCCB670;
void TheHacks() //Hack Thread
{
while(1)
{
*(float*)(dwPlayerPtr+0x2C) = 60;
Sleep(50);
}
}
BOOL WINAPI DllMain(HINSTANCE module, DWORD dwReason, LPVOID lpvReserved)
{
if(dwReason == DLL_PROCESS_ATTACH)
{
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)TheHacks, NULL, NULL, NULL); //create the new Thread
}
return TRUE;
}
Try the following:
haven't checked for errors and typed in a reply.Code:#include <windows.h>
#include <stdio.h>
DWORD dwPlayerPtr;
void TheHacks() //Hack Thread
{
while(*dwPlayerPtr == 0)
{
Sleep(1000);
}
while(1)
{
*(int*)(dwPlayerPtr+0x2C) = 60; // 60 is an int ^^
Sleep(50);
}
}
BOOL WINAPI DllMain(HINSTANCE module, DWORD dwReason, LPVOID lpvReserved)
{
if(dwReason == DLL_PROCESS_ATTACH)
{
dwPlayerPtr = /***/(DWORD*)0xCCB670; // ?
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)TheHacks, NULL, NULL, NULL); //create the new Thread
}
return TRUE;
}
I'm a noob and all, so I have no idea what this means, but these are the errors that Dev c++ kicked back to me.
In function `void TheHacks()':
invalid type argument of `unary *'
In function `BOOL DllMain(HINSTANCE__*, DWORD, void*)':
WarRock.cpp invalid conversion from `DWORD*' to `DWORD'
[Warning] passing NULL used for non-pointer converting 2 of `void* CreateThread(_SECURITY_ATTRIBUTES*, DWORD, DWORD (*)(void*), void*, DWORD, DWORD*)'
[Warning] passing NULL used for non-pointer converting 5 of `void* CreateThread(_SECURITY_ATTRIBUTES*, DWORD, DWORD (*)(void*), void*, DWORD, DWORD*)'
This may help you guys out, or maybe i'm just getting errors because I have no clue what i'm doing and shouldn't be trying to compile someone elses code.
Did you make it into a .cpp file or a .dll file? Make a new project and select an empty project and when prompted select .dll...
Okay, now I see the addresses and offsets you are trying to make a stamina hack?
Here is mine.
[php]if( g_uiStamina == 1) // Full
{
DWORD dwPlayerPointer = *(DWORD*)ADR_PLAYERPOINTER;
if(dwPlayerPointer != NULL) // < -- IsInGame!
{
*(float*)(dwPlayerPointer+OFS_STAMINA) = 100;
}
}[/php]