| QUOTE (ThePrince @ Friday, Jun 29 2012, 19:29) |
I'm not good in Coding, but i want to change VC Cheat codes,
Let say for Exemple: i want to change ASPIRINE to ASPRO. how do i write the Cheat String ? |
Replacing standard cheats is bit tricky for newbies. I described it here:
http://www.gtaforums.com/index.php?showtop...st&p=1060723183006D8624 ASPIRINE db 'HSPSVkVH',0
Encrypted ASPIRINE becomes HSPSVkVH and I shared function to decrypt and encrypt strings using GTA VC cheat algorithm.
Encrypted ASPRO becomes RWWTN
To replace cheat string we need to write into memory address of that cheat.
The code will work assuming that your gta_vc.exe has 3 088 896 bytes.
| CODE |
{$CLEO} // Author: fastman92 // Description: ASPIRINE cheat code is replaced into ASPRO code
05DF: write_memory 0x6D8624 size 4 value 0x54575752 virtual_protect false // "RWWT" 05DF: write_memory 0x6D8628 size 2 value 0x004E virtual_protect false // "N" and NULL
05DC: end_custom_thread |
Must be compiled as CLEO script.
You can cheat strings if you happen to know the details of simple GTA VC IDB reengineering till the plugin to change the cheat strings comes out.
-------------------------------
Today i created a very useful SCM function GetBaseIP for GTA VC.
It gets memory address to beginning of script content.
The code will work assuming that your gta_vc.exe has 3 088 896 bytes.
| CODE |
{$CLEO} 05F5: call_scm_func @GetBaseIP 0 store_to 3@
// you can do // 3@ -= @label // to get memory address to @label
while true wait 0 01E5: show_text_1number_highpriority GXT 'NUMBER' number 3@ time 5000 flag 1 // See the address of script content in decimal format end
05DC: end_custom_thread
:GetBaseIP // Example: 05F5: call_scm_func @GetBaseIP 0 store_to 3@ 05EC: 0@ = current_thread_pointer 0@ += 0x10 05E0: 0@ = read_memory 0@ size 4 virtual_protect false
:GetBasePastTheReadMemory 0@ += 0x821280 // _scmBlock 0@ += 3 // size of (03 00 00, 0@ = ) 0@ += @GetBasePastTheReadMemory 05F6: ret 1 0@ |
This post has been edited by fastman92 on Thursday, Jul 5 2012, 15:46