In45do Posted May 21, 2014 Share Posted May 21, 2014 I'm learning memory adresses few days ago. I know how to get the struct and write the value (byte). But I'm confuse on how to check the current value of the struct. For example : :Get_Car04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.00AE2: [email protected] = random_vehicle_near_point [email protected] [email protected] [email protected] in_radius 2.0 find_next 0 pass_wrecked 1 :Struct_Examplewait 0 ms 0A97: [email protected] = car [email protected] [email protected] += 12720A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 00A8C: write_memory [email protected] size 4 value 1 virtual_protect 0 That struct is used to lock and unlock a car. But I want to know how to check the current value of that struct. A help would be aprreciated. (Sorry for my grammar mistakes) Link to comment Share on other sites More sharing options...
Silent Posted May 21, 2014 Share Posted May 21, 2014 (edited) Just check the value of a variable you read things to? In this case, [email protected]. Edited May 21, 2014 by Silent In45do 1 Link to comment Share on other sites More sharing options...
In45do Posted May 22, 2014 Author Share Posted May 22, 2014 Thanks it works! I have another question, is there a possibilities to check "rebuild player" command through memory adresses? At GTAModding.com , they don't have it. (it's not documented or something?) Link to comment Share on other sites More sharing options...
Deji Posted May 22, 2014 Share Posted May 22, 2014 Thanks it works! I have another question, is there a possibilities to check "rebuild player" command through memory adresses? At GTAModding.com , they don't have it. (it's not documented or something?) Memory addresses only store values. What is the value of "rebuild player"? There is none! You'd have to hook into the function which rebuilds the player check that. What would be the point, anyway? Link to comment Share on other sites More sharing options...
NTAuthority Posted May 23, 2014 Share Posted May 23, 2014 Memory addresses only store values. What is the value of "rebuild player"? There is none!important: don't sacrifice accuracy in attempting to make less-informed people understand the value is a perfectly fine set of x86 opcodes someplace in the code memory section Inactive in GTA/R* title modification indefinitely pursuant to a court order obtained by TTWO. Good job acting against modding! Link to comment Share on other sites More sharing options...
Deji Posted May 23, 2014 Share Posted May 23, 2014 Memory addresses only store values. What is the value of "rebuild player"? There is none! important: don't sacrifice accuracy in attempting to make less-informed people understand the value is a perfectly fine set of x86 opcodes someplace in the code memory section Heh, I did hesitate in posting that, but I felt it was still accurate enough. Memory addresses in the code section don't alone represent values, but they provide a way to know where the temporary values might be stored. It's all utter garbage until the CPU executes it, which is where the hook comes in. Unfortunately, CLEO scripts don't run asynchronously and there's no way to simply check when the EIP hits the 'rebuild_player' handler, so excessive interruption of that function is the only option left Link to comment Share on other sites More sharing options...
In45do Posted May 23, 2014 Author Share Posted May 23, 2014 You'd have to hook into the function which rebuilds the player check that. What would be the point, anyway? If player using skin model and wasted or busted, the player become an alien physic. Look's buggy. important: don't sacrifice accuracy in attempting to make less-informed people understand the value is a perfectly fine set of x86 opcodes someplace in the code memory section Thanks, I will try. Heh, I did hesitate in posting that, but I felt it was still accurate enough. Memory addresses in the code section don't alone represent values, but they provide a way to know where the temporary values might be stored. It's all utter garbage until the CPU executes it, which is where the hook comes in. Unfortunately, CLEO scripts don't run asynchronously and there's no way to simply check when the EIP hits the 'rebuild_player' handler, so excessive interruption of that function is the only option left What about doing some checks while player is wasted or busted? I know it wouldn't be easy. Link to comment Share on other sites More sharing options...
NTAuthority Posted May 23, 2014 Share Posted May 23, 2014 You'd have to hook into the function which rebuilds the player check that. What would be the point, anyway? If player using skin model and wasted or busted, the player become an alien physic. Look's buggy. you'd probably be able to use in-line script assembly 'abuse' to hook this somehow, but it's fairly complex, especially with Sanny as it doesn't include an inline assembler Inactive in GTA/R* title modification indefinitely pursuant to a court order obtained by TTWO. Good job acting against modding! Link to comment Share on other sites More sharing options...
Deji Posted May 23, 2014 Share Posted May 23, 2014 If player using skin model and wasted or busted, the player become an alien physic. Look's buggy. Then you don't need to check for rebuild_player at all, you need to use it and check for something else Also, I wonder if this would work well enough: 0665: get_char_model $PLAYER_ACTOR store_to [email protected]Assuming the returned value isn't 0 (#NULL), the player has a changed model. This at least lets you know when rebuild_player isn't completely useless, but still you'd really only want to trigger a rebuild once when the bug occurs. Though with SA now feeling as old as DOS games were when SA was released, surely running the rebuild_player every frame won't be too disturbing. I forget the specifics of the bug, but I think I already wrote a similar cheap loop to fix it at one time. However I think it consisted of checking the players current model and re-applying it afterwards as the model would reset on use... or something like that. I only remember it happening after physical stat changes, though (they could be triggered on wasted/busted regeneration too - in that case, you can simply run rebuild_player whenever the stats change and then re-apply the old model). Link to comment Share on other sites More sharing options...
In45do Posted May 24, 2014 Author Share Posted May 24, 2014 @NTAuthority Could you teach me how? @Deji What a coincidence, I was going to use opcode 0665. That's the same technique I did in switching mod.I got another question (out of topic), what's the difference function of these opcode other than its words : 0811: [email protected] = actor $PLAYER_ACTOR used_car03C0: [email protected] = actor $PLAYER_ACTOR car Link to comment Share on other sites More sharing options...
fastman92 Posted May 24, 2014 Share Posted May 24, 2014 (edited) @NTAuthority Could you teach me how? @Deji What a coincidence, I was going to use opcode 0665. That's the same technique I did in switching mod. I got another question (out of topic), what's the difference function of these opcode other than its words : 0811: [email protected] = actor $PLAYER_ACTOR used_car03C0: [email protected] = actor $PLAYER_ACTOR car STORE_CAR_CHAR_IS_IN_NO_SAVE = 0x03C0 GET_CAR_CHAR_IS_USING = 0x0811 Both commands are no_save actually. But from what I have seen in the game executable, the GET_CAR_CHAR_IS_USING command will also return a vehicle from task with ID 700 or 701. That seems to be a car a ped is going to enter (when you press F or enter). I haven't tested it in game with CLEO script, only analyzed the game code. Test it if you have time. Check when 0811 returns non-zero value by printing it with 0AD1 command. Edited May 24, 2014 by fastman92 Link to comment Share on other sites More sharing options...
Deji Posted May 24, 2014 Share Posted May 24, 2014 03C0 0811 SCR describes it bettah! Link to comment Share on other sites More sharing options...
In45do Posted May 26, 2014 Author Share Posted May 26, 2014 (edited) @fastman92 I will check it. (sorry for long response)@Deji Thanks, I like your website btw. Edit : I saw your thread on GTAGaming few days ago about HUD addresses. Is it possible to change GTA IV HUD money, vehicle text, black blip, etch. back to their original colour? Their original colour should be green. Edited May 26, 2014 by In45do 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