You are not logged in.
Pages: 1
Hey, How can I read out a Car ID from the Memory?
I tried it in that way:
0@ = 0xB74494 0A8D: 1@ = read_memory 0@ size 4 virtual_protect 0 1@ += 34 0A8D: 2@ = read_memory 1@ size 2 virtual_protect 0 045A: draw_text_1number 50.0 30.0 GXT 'number' number 2@
I want to read the CarId of the first car in th Pool. But I get "134", and that is no CarID...
I took the adresses from here:
http://www.gtamodding.com/index.php?tit … SA%29#Cars
Offline
0xB74494 - Contains a pointer
you read a pointer, so you need to get the address from it
0A8D: 1@ = read_memory 0xB74494 size 4 virtual_protect 0 // read ptr 0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0 // get the 1st vehicle address 1@ += 34 0A8D: 2@ = read_memory 1@ size 2 virtual_protect 0 045A: draw_text_1number 50.0 30.0 GXT 'number' number 2@
Offline
Ok thanks, that works.
I tried to read out the XYZ Position, but I always get 0, any idea why?
here is my test to get X:
0A8D: 3@ = read_memory 0xB74494 size 4 virtual_protect 0 // read ptr 0A8D: 3@ = read_memory 3@ size 4 virtual_protect 0 // get the 1st vehicle address 3@ += 20 0A8D: 4@ = read_memory 3@ size 4 virtual_protect 0 // read Matrix ptr 4@ += 48 0A8D: 5@ = read_memory 4@ size 4 virtual_protect 0 // get X 0092: 6@ = float 5@ to_integer 045A: draw_text_1number 50.0 40.0 GXT 'number' number 6@
Last edited by ATP (17-07-2009 09:31)
Offline
Try this
0A8D: 5@ = read_memory 4@ size 4 virtual_protect 0 // get X 5@ *= 100.0 0092: 6@ = float 5@ to_integer 6@ /= 100 045A: draw_text_1number 50.0 40.0 GXT 'number' number 6@
Offline
There's a function that converts car pointer to the handle. I used it in this script
0A8D: 1@ = read_memory 0x00B74494 size 4 virtual_protect 0 0AA8: call_function_method 0x00424160 struct 1@ num_params 1 pop 0 0@ 1@
0@ - input pointer
1@ - output handle
Offline
Pages: 1