Jump to content

Mission thread variables


Yoda2604

Recommended Posts

Ok. I have a question. If smb could help it would be greatly appreciated.

Is there a way to read (get) thread variable values in a mission thread (those after 34@)?

 

:OTB_7451...00D6: if 0039:   453@ == 1 004D: jump_if_false @OTB_7544 0002: jump @OTB_7551 ...:OTB_75510391: release_txd_dictionary 0390: load_txd_dictionary 'LD_OTB' ...

 

For example the value of that 453@?

Link to comment
Share on other sites

I don't get it. You just use them as regular variables, what do you want to do yet? Read mission variables from regular threads?

Link to comment
Share on other sites

I don't get it. You just use them as regular variables, what do you want to do yet? Read mission variables from regular threads?

Here is the way to read local variabe values of a thread (up to 32@ + 2 timers - 33@ and 34@). To get the value of 0@ in OTB thread you just need to do smth like this:

 

0AAA: 10@ = thread 'OTB' pointer00D6: if0019:   10@ > 00AA1: return_if_false000A: 10@ += 60 // +4 for each next variable0A8D: 11@ = read_memory 10@ size 4 virtual_protect 0

 

And my question is how to get the values of mission variables (missions has up to 1024 variables)?

Link to comment
Share on other sites

You must do so using read/write opcodes.

 

The mission vars are stored at 0xA48960, it's an array of 1024 4-byte values.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.