View previous topic :: View next topic |
Author |
Message |
Frouk Master Cheater Reputation: 5
Joined: 22 Jun 2021 Posts: 489 Location: mov dword ptr [Ukraine]
|
Posted: Sat Oct 16, 2021 11:56 am Post subject: [C Code]Value type without name |
|
|
This is example where i can use in c++:
Code: | *(unsigned char*)0xA888F1 = 0; |
But i didn't found how to do in c code
_________________
void(__cdecl *Haxing)(HWND hGameWindow) |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Sat Oct 16, 2021 1:13 pm Post subject: |
|
|
have you tried using that C code inside a CCode block ?
Seems to work just fine for me.
If you're on 7.3 just give it at least one name
{$ccode bla=rax}
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Frouk Master Cheater Reputation: 5
Joined: 22 Jun 2021 Posts: 489 Location: mov dword ptr [Ukraine]
|
Posted: Sat Oct 16, 2021 1:28 pm Post subject: |
|
|
It just saying that error in line 14
here's code:
Code: | globalalloc(cameraAI,1024)
createThread(cameraAI)
cameraAI:
{$ccode tmp=eax}
typedef int(__cdecl *fCameraAI_SetAction)(int,char*,void);
fCameraAI_SetAction CameraAI_SetAction = (fCameraAI_SetAction)0x48D620;
CameraAI_SetAction(1,"%s");
if ("%s" == "CDActionDebugWatchCar")
{
unsigned char* 0xA888F1 = 1;
if (GetKeyState(107) & (1<<15))
{
unsigned char* 0xA88914 += 1;
}
if (GetKeyState(109) & (1<<15))
{
unsigned char* 0xA88914 -= 1;
}
else
{
unsigned char* 0xA888F1 = 0;
}
}
{$asm}
ret |
_________________
void(__cdecl *Haxing)(HWND hGameWindow) |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Sat Oct 16, 2021 1:56 pm Post subject: |
|
|
instead of
Code: |
unsigned char* 0xA888F1 = 1;
|
try
Code: |
*(unsigned char*)0xA888F1 = 0;
|
and similar for the other lines
Code: |
unsigned char* 0xA88914 += 1;
|
should be
Code: |
(*(unsigned char*) 0xA88914) += 1;
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Frouk Master Cheater Reputation: 5
Joined: 22 Jun 2021 Posts: 489 Location: mov dword ptr [Ukraine]
|
Posted: Sat Oct 16, 2021 2:02 pm Post subject: |
|
|
ty
EDIT:
btw, how to do with int parameter?
_________________
void(__cdecl *Haxing)(HWND hGameWindow) |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Sat Oct 16, 2021 2:48 pm Post subject: |
|
|
also,
Code: |
if ("%s" == "CDActionDebugWatchCar")
|
will not work. String compares in c are pointer compares and the address of "%s" is not the same as the address of CDActionDebugWatchCar"
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
|