TheGodfather. Posted November 18, 2012 Share Posted November 18, 2012 Hi, Everyone... I need to know about memory coding I saw ZAZ tutorial but it wasn't too much helpful.. Can someone tell me about it (how to use mem codes in CLEO)?? Or atleast provide a link for tutorial related to mem coding ?? Please guys I am waiting for your replies.. Link to comment Share on other sites More sharing options...
Shmoopy Posted November 18, 2012 Share Posted November 18, 2012 Hi , Memory coding is like the mother cell from were opcodes and scripts are generated ( daughter cells) First , i didn't understand sh*t from what people were saying in the forums( Dword CPed , 0x4qs5d4.... , ) and all that stuff , but i managed somehow to understand it a bit by myself , so here is the parts that i understood : . Opcodes are memory addresses , in fact the whole GTA SA is based on memory addresses , Opcodes were made to simplify things , like instead of writing a whole (read memory [email protected] write 0xdq145 .... size ..value ..) u simply write the opcode ( 0az1:show_hud ) .If you check out this wiki page , u can find some memory addresses , and when i say some i mean like 1% of the whole memory addresses that exists in GTA , about 215.432.564 memory address ... .Lets try one of those , for exemple i picked this : __________________________ 0xB70153 - [byte] Current Hour __________________________ Ok , as you can see this memory address is about the actual hour ingame , so , you either get (read) its value , or give (write) it a value . So when we want to get some ingame stats ( What is the actual Hour , Fat stat , Stamina , Health , Armour , .... ) we read memories , and when we want to edit stats ( I want the actual hour to be 08 am ...) we write memories . So you either : 0A8D: [email protected] = read_memory 0xB70153 size 1 virtual_protect 0 or 0A8C: write_memory 0xB70153 size 1 value 8 virtual_protect 0 Now for the part that im not sure about , and im too lazy (or stupid) to figure it out , its the Size , i "think" that it refers to the nature of the memory (0xB70153 - [byte] Current Hour) I think that size 1 : Byte , size 2 : Dword , size 4 : Float , im not sure ... ____________________________________________ As you can notice by going throu' the wiki page , there are some lines that say ( CPed +0x568 ...) Well , i dont know about them , but i figured out how to get them work ... : Here is a script that i made for it : :Memo wait 400 0A96: [email protected] = actor $PLAYER_ACTOR struct 0A8E: $status = [email protected] + 0x4DF // int 0A8D: $status = read_memory $status size 1 virtual_protect 0 03C4: set_status_text $status type 0 GXT 'ZER2_43' // global_variable // Score ~1~ 059C: enable_status_text $status flashing 0 // global_variable jump @Memo In the wiki: CPed +0x4DF = Current anim play-state: 0 = nothing 61 = starting/stopping 62 = looping this memory address functions like this : First , we get CJ's structure with ; 0A96: [email protected] = actor $PLAYER_ACTOR struct , its the CPed . Then we add the thing that we want to this struct CPed , in the exemple i added 0x4DF ; 0A8E: $status = [email protected] + 0x4DF // int Finally to see the result i add a status text ; 03C4: set_status_text $status type 0 GXT 'ZER2_43' // global_variable // Score ~1~ 059C: enable_status_text $status flashing 0 // global_variable . Hope you like this , i know , im kinda hazardous ... Link to comment Share on other sites More sharing options...
Bad.boy! Posted November 18, 2012 Share Posted November 18, 2012 Memory coding is like the mother cell from were opcodes and scripts are generated ( daughter cells) Opcodes aren't memory addresses. @arijitsen All applications use memory. A memory address points to a specific point in the memory of an application. The size is how much memory the pointer points to. BYTE = 1, WORD = 2 and DWORD = 4. CPed +0x4DF = Current anim play-state:0 = nothing61 = starting/stopping62 = looping In this case, CPed is the address of the actor struct. So you need to get that first. If you add 0x4DF to that address, it points to the region where the current anim play-state is stored. Now you have the pointer to that address. The only thing you have to do is read it. Link to comment Share on other sites More sharing options...
TheGodfather. Posted November 19, 2012 Author Share Posted November 19, 2012 @fable - Which wiki are you talking about ?? As you can notice by going throu' the wiki page , there are some lines that say ( CPed +0x568 ...) Anyways I am getting to undertand a bit by bit but suppose I want to make a script by which when I press TAB it gives me weapon set 1 So what we are going to use read memory 0x969130 ...or write memory ?? What this two opcodes do ???What's the diff. bet. them..Can you give me an ex. of a mem. coding script.??? I am a good modder but memmory coding is my weak point.. Hmm..I sound kinda funky to you huh?? Link to comment Share on other sites More sharing options...
Shmoopy Posted November 19, 2012 Share Posted November 19, 2012 This wiki : http://www.gtamodding.com/index.php?title=...resses_%28SA%29 Ok , so you want to use Weapon Set 1 : Cheats: [byte] Can be either on (1) or off (0). . 0x969130 - Weapon Set 1 . 0x969131 - Weapon Set 2 . 0x969132 - Weapon Set 3 .... First, as Bad.boy! mentioned , you need to know first the value that this memory address can handle , for this one , its a [byte] , so it can either be 1 or 0 ( 1:True , 0:False) -------------------------Writing memory-------------------------- Now if you want to add this weapon set to the game , you just have to : 0A8C: write_memory 0x969130 size 1 value 1 virtual_protect 0 Now the cheat is activated , and you shall have the weapon set , if you want to desactivate it , then : 0A8C: write_memory 0x969130 size 1 value 0 virtual_protect 0 -------------------------Reading memory-------------------------- Lets say you cant remember if you've already activated the cheat , you need to know if the cheat is activated or not , here is when we use read_memory : 0A8D: [email protected] = read_memory 0x969130 size 1 virtual_protect 0 So , [email protected] is the answer from the game : [email protected] == 1 : Cheat is activated [email protected] == 0 : Cheat is desactivated Link to comment Share on other sites More sharing options...
TheGodfather. Posted November 19, 2012 Author Share Posted November 19, 2012 Thanks a lot now you got my point & now I not only understood but also my script runs..I mean works thanks a lot... I needed to know this for a long time ..Thanks Have some cookies both of you Link to comment Share on other sites More sharing options...
Bad.boy! Posted November 19, 2012 Share Posted November 19, 2012 First, as Bad.boy! mentioned , you need to know first the value that this memory address can handle , for this one , its a [byte] , so it can either be 1 or 0 ( 1:True , 0:False) A byte can be also be a small number. It can range from 0 to 255 or -128 to 127. But in this case it is indeed a boolean. Link to comment Share on other sites More sharing options...
TheGodfather. Posted November 19, 2012 Author Share Posted November 19, 2012 Bad.boy - So is byte dependent on certain cases ?? How will I come to know when it will be no. & when it will be boolean ?? Also while going through the mem addresses I found : 0xA49F04 - [dword] Helena Progress So what this DWORD stands for ?? Link to comment Share on other sites More sharing options...
UNRATED69 Posted November 20, 2012 Share Posted November 20, 2012 That's the relationship progress for Helena, one of the girlfriends. It's a number between 0-100, representing your current relationship with her. Link to comment Share on other sites More sharing options...
Link2012 Posted November 20, 2012 Share Posted November 20, 2012 BOOL is a value that can be 1 (true) or 0 (false), Well, if you insert another value that's not 0 we can consider that the value is true, it is normally implemented as a BYTE. BYTE is a value with 1 byte in size (as the name tell). Depending if the value is signed or unsigned the value can be in the range 0~255 or -128~127 WORD is a value with 2 bytes in size. The value can be -32768~32767 if signed or 0~65535 if unsigned. DWORD is a D(ouble)WORD, that means that the size is 4. The value can be -2147483648~2147483647 if signed or 0~4294967295 if unsigned. There's more, but they don't have a point at all in gta modding. By the way, what about that PM? You couldn't understand? Link to comment Share on other sites More sharing options...
Wesser Posted November 20, 2012 Share Posted November 20, 2012 It is advisable to not confuse such types with Microsoft's typedefs which are unsigned unequivocally. On the other hand, here is the comparison between ASM and the most used ANSI types. 012 345 678 9A BCD EFG HIJK LMN OPQR STUV WX YZ Link to comment Share on other sites More sharing options...
TheGodfather. Posted November 20, 2012 Author Share Posted November 20, 2012 Thanks guys..I needed to know that... @Link2012- I understood what you told me but got kinda confused with that read & write memory..Also I tried to write some mem. code scripts but they didn't worked but now it's Ok... Link to comment Share on other sites More sharing options...
Bad.boy! Posted November 20, 2012 Share Posted November 20, 2012 A float is usually also 4 bytes in size (dword). Haven't seen it mentioned here. Link to comment Share on other sites More sharing options...
TheGodfather. Posted November 21, 2012 Author Share Posted November 21, 2012 Thanks ...I think I should ask all my memory coding related problems here..If you guys don't have any problem... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now