ccode void[solved]

Anything Cheat Engine related, bugs, suggestions, helping others, etc..
Post Reply
Frouk
Expert Cheater
Expert Cheater
Posts: 87
Joined: Wed Jun 30, 2021 10:21 am
Reputation: 16

ccode void[solved]

Post by Frouk »

I already know how to call function void, but idk how to call function with boolean
Last edited by Frouk on Tue Oct 12, 2021 11:48 am, edited 2 times in total.

User avatar
SunBeam
Administration
Administration
Posts: 4932
Joined: Sun Feb 04, 2018 7:16 pm
Reputation: 4630

Re: C# Code void

Post by SunBeam »

Seriously?.. Define a boolean value and assign tk it the boolean function.

bool myBool = MyBoolFunc()

bool MyBoolFunc()
{
...
return true
}

Frouk
Expert Cheater
Expert Cheater
Posts: 87
Joined: Wed Jun 30, 2021 10:21 am
Reputation: 16

Re: C# Code void

Post by Frouk »

Not like this
In c++ i can use
void(*Game_SetCopsEnabled)(bool AreCopsEnabled) = (void(*)(bool))0x6513E0;

Frouk
Expert Cheater
Expert Cheater
Posts: 87
Joined: Wed Jun 30, 2021 10:21 am
Reputation: 16

Re: C# Code void

Post by Frouk »

any1?

User avatar
SunBeam
Administration
Administration
Posts: 4932
Joined: Sun Feb 04, 2018 7:16 pm
Reputation: 4630

Re: C# Code void

Post by SunBeam »

Man, you want to typedef a known pointer (address) to a name you want to give to a function. That's what I see there. Please explain better your quest next time.

Frouk
Expert Cheater
Expert Cheater
Posts: 87
Joined: Wed Jun 30, 2021 10:21 am
Reputation: 16

Re: ccode void

Post by Frouk »

I mean c code void(Cheat Engines update with c-compiler)

Code: Select all

typedef int(__cdecl *fDisableDriftPhys)(void);

fDisableDriftPhys DisableDriftPhys = (fDisableDriftPhys)0x65C910;

DisableDriftPhys()
I can use this to call game function without any boolean or value types
All i want is to call game function with boolean

Code: Select all

CopToggleSwitch(true) //Enable Cops
CopToggleSwitch(false) //Disable Cops
But i don't know how to, i tried all my ideas, even searched in google but didn't find

Eric
Hall of Famer
Hall of Famer
Posts: 174
Joined: Thu Mar 02, 2017 11:01 pm
Reputation: 90

Re: ccode void

Post by Eric »

it's called "parameters"

and you can just add them to the typedef parameters

if bool won't work use int and define true as 1 or 0xffffffff and false as 0

Frouk
Expert Cheater
Expert Cheater
Posts: 87
Joined: Wed Jun 30, 2021 10:21 am
Reputation: 16

Re: ccode void

Post by Frouk »

Eric wrote:
Tue Oct 12, 2021 8:43 am
it's called "parameters"

and you can just add them to the typedef parameters

if bool won't work use int and define true as 1 or 0xffffffff and false as 0
Can you write down an example?(i can't rid of errors)

Frouk
Expert Cheater
Expert Cheater
Posts: 87
Joined: Wed Jun 30, 2021 10:21 am
Reputation: 16

Re: ccode void

Post by Frouk »

nvm i get it(mistake that was in my script is one more parameter(int)(void) <-- this was an mistake)

Post Reply

Who is online

Users browsing this forum: No registered users