| View previous topic :: View next topic |
| Author |
Message |
jim2point0 Master Cheater
Reputation: 4
Joined: 05 Oct 2012 Posts: 336
|
Posted: Mon Oct 28, 2013 7:00 pm Post subject: [help] script crashes game when run from table |
|
|
Hello,
So this is for Battlefield 4 single player. So I have a snippet of code that works fine when I "replace with code that does nothing" \ "restore original code" but crashes the game when I try it in a [enable] [disable] script.
The piece of code is in the "advanced options."
The script is in the table.
The script hides your weapon model. It's for screenshotters =)
If anyone can take a look and see what's wrong, I'd appreciate it.
The script itself is pretty simple so I'll post that here:
| Code: | [ENABLE]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
newmem: //this is allocated memory, you have read,write,execute access
//place your code here
jmp exit
originalcode:
movss [rbx],xmm13
exit:
jmp returnhere
"bf4.exe"+684AA3:
jmp newmem
returnhere:
[DISABLE]
dealloc(newmem)
"bf4.exe"+684AA3:
movss [rbx],xmm13 |
| Description: |
|
 Download |
| Filename: |
bf4.CT |
| Filesize: |
1.45 KB |
| Downloaded: |
758 Time(s) |
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25831 Location: The netherlands
|
Posted: Tue Oct 29, 2013 3:34 am Post subject: |
|
|
Try alloc(newmem,2048,bf4.exe)
_________________
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
Last edited by Dark Byte on Tue Oct 29, 2013 1:55 pm; edited 1 time in total |
|
| Back to top |
|
 |
jim2point0 Master Cheater
Reputation: 4
Joined: 05 Oct 2012 Posts: 336
|
Posted: Tue Oct 29, 2013 1:52 pm Post subject: |
|
|
I can give that a try.
It occurred to me that my problem might be due to running the 64bit version of the game. This is the first time I've tried a native 64bit EXE. Not sure if they're any different as far as coding tables\scripts is concerned.
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25831 Location: The netherlands
|
Posted: Tue Oct 29, 2013 1:54 pm Post subject: |
|
|
in 64-bit a jump can be 14 bytes long if the jump distance is bigger than 7fffffff
the 3th alloc parameter tells ce to allocate memory in the memory nearby the given address
_________________
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 |
|
 |
|