Something tells me i did somthing wrong

Posts 1–4 of 4 · Page 1 of 1
Something tells me i did somthing wrong
Code:
#define OFF_RECOIL1 0x3
#define OFF_RECOIL2 0x6
#define OFF_RECOIL3 0x9


___________________________________
void recoil()
{
	DWORD dwPlayerPtr = *(DWORD*)Playerpointer;
    if(dwPlayerPtr != 0)

		*(float*)(OFF_RECOIL1+OFS_Z) = 0;
	*(float*)(OFF_RECOIL2+OFS_Y) = 0;
		*(float*)(OFF_RECOIL3+OFS_X) = 0;
}
i Was thinking i could do 2 things instead of relating it to xyz...relate the no recoil to the crosshair offset....But like idk

omg lol i think i get it now
Code:
#define OFF_RECOIL1 0x3
#define OFF_RECOIL2 0x6
#define OFF_RECOIL3 0x9


___________________________________
void recoil()
{
	DWORD dwPlayerPtr = *(DWORD*)Playerpointer;
    if(dwPlayerPtr != 0)

		*(float*)(OFF_RECOIL1, OFF_RECOIL2, OFF_RECOIL3+OFS_Z) = 0;
	*(float*)(OFF_RECOIL1, OFF_RECOIL2, OFF_RECOIL3+OFS_Y) = 0;
		*(float*)(OFF_RECOIL1, OFF_RECOIL2, OFF_RECOIL3+OFS_X) = 0;
}
Still crashes the game Hrrmm
Anyideas
Unfortunately rwkeith hasn't been on lately. He was pretty good with Warrock stuff, but look:

1st off why are you casting a pointer to a float?
Code:
 *(float*)(OFF_RECOIL1, OFF_RECOIL2, OFF_RECOIL3+OFS_Y) = 0;
I'm not sure how that would compile, much less run. :L

2nd you for go to put brackets after the if statement.
Code:
if(dwPlayerPtr != 0)
{
		*(float*)(OFF_RECOIL1, OFF_RECOIL2, OFF_RECOIL3+OFS_Z) = 0;
	*(float*)(OFF_RECOIL1, OFF_RECOIL2, OFF_RECOIL3+OFS_Y) = 0;
		*(float*)(OFF_RECOIL1, OFF_RECOIL2, OFF_RECOIL3+OFS_X) = 0;
}
It should look like that....

There are so many simple errors in this that its actually quite hard to get to the real problem. Even Just copying and pasting you need to know a little bit about C++. I really recommend you learn it. That way you can solve simple problems yourself when editing someone else's code and we can tackle the real issues.

It's fairly obvious you got this code from someone else who edited it a bunch, who got it from someone else, and so on... try finding an original source and learn C++ for christsake and then come back. You need to atleast know something about what your doing, so I won't mind if you ask a question such as "How does this hack work?"... ofcourse you would have to specify which kind of 'hack' but I would trry to help.
wtf why? why the commas?

Code:
void recoil()
{
	DWORD dwPlayerPtr = *(DWORD*)Playerpointer;
    if(dwPlayerPtr != 0){

		*(float*)(OFF_RECOIL1+dwPlayerPtr) = 0; //PROBLEM HERE
	*(float*)(OFF_RECOIL2+dwPlayerPtr) = 0;
		*(float*)(OFF_RECOIL3+dwPlayerPtr) = 0;
}
}
Why do u add the recoil offsets and the xyz offsets?
I was just testing i know im a nub but im trying to learn a lot more..and bye experimenting by setting it with x,y,z i thought the cursor wouldn't move, logically speaking im just trying my best and @why06jz I got a book about c++ and im reading it atm but in the mean time i wish to learn just to make simple hacks no-spread no-recoil etc....thanks for your criticism but i already been told to learn c++, and i am but if someone could show me how to get no-recoil and no-spread then that will due till i finish my book.
Posts 1–4 of 4 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

Need help?