|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
SrmsReis How do I cheat? Reputation: 0
Joined: 28 Feb 2021 Posts: 7 Location: Brazil
|
Posted: Fri Mar 26, 2021 3:46 pm Post subject: I need help with cmps |
|
|
Im tryng to make a code with cmps but the dedicate keep crashing, I am very new to cheat engine so idk what is happening
[code]
registersymbol(GN)
alloc(GN,04)
alloc(9mm,$100)
alloc(Uzi,$100)
alloc(MP5,$100)
alloc(Magnum,$100)
alloc(M16,$100)
alloc(AK47,$100)
alloc(comps,$100)
//////////////////////////arm////////////////////////
comps:
cmp [GN],0
je AK47
cmp [GN],2
je M16
cmp [GN],4
je Magnum
cmp [GN],6
je MP5
cmp [GN],8
je Uzi
cmp [GN],10
je 9mm
AK47:
"subrosadedicated024d.exe"+4A0BC:
push 00
jmp exit
M16:
"subrosadedicated024d.exe"+4A0BC:
push 02
jmp exit
Magnum:
"subrosadedicated024d.exe"+4A0BC:
push 04
jmp exit
MP5:
"subrosadedicated024d.exe"+4A0BC:
push 06
jmp exit
Uzi:
"subrosadedicated024d.exe"+4A0BC:
push 08
jmp exit
9mm:
"subrosadedicated024d.exe"+4A0BC:
push 0A
jmp exit
exit:
Description: |
|
Filesize: |
10.84 KB |
Viewed: |
1253 Time(s) |
|
|
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Fri Mar 26, 2021 4:11 pm Post subject: |
|
|
Well, "GN" is never set. And after the compares you have no return of any kind, so if the value isn't one listed then it runs whatever is after that (likely zeros). Plus all the gun labels are never written to so when you jump to those it's likely zeros (you write to the addresses below the labels). And not sure if CE fixes this for you or not, but you register a symbol ("GN") that doesn't exists yet then you create the symbol and allocate the memory for it. And I'm assuming the push to the stack is dealt with by the game later, if not that's a problem as well.
EDIT: And on a side note you allocate a lot more memory then you need, you could easily just use one allocation. I think CE still allocates 1000 bytes per call (might just be a windows thing). So that's 7000 bytes for less than 100 bytes of code.
_________________
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25298 Location: The netherlands
|
Posted: Fri Mar 26, 2021 5:01 pm Post subject: |
|
|
the allocs are fine. CE groups all allocs together into one alloc and designates the addresses based on the size and the order they appear in
But you're not allocating or labeling "exit" which is going to be a problem, as there is a global function in windows called "exit"
So, when you jump to Exit, you're jumping to that function
_________________
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 |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|