Jump to content

I need some opcode


Jack

Recommended Posts

Which opcode is used for checking if a player or actor is inside some interior? So far I only found the opcode below but I can't use it for conditional checking confused.gif

 

04BB: select_interior 0 // select render area

 

And I need the opcode for Vice City.

Edited by JACK JONES
Link to comment
Share on other sites

Guess you'll have to do some memory reading (CLEO says hi):

 

 

05E0: 0@ = read_memory 0x978810 size 4 virtual_protect 0

 

 

If you use 1.0 EXE, 0@ should contain current interior ID.

Link to comment
Share on other sites

Annihilationzh

For the sake of any searches that end up here. It's opcode 077E

 

 

077E: get_active_interior_to $ACTIVE_INTERIOR

 

Link to comment
Share on other sites

 

For the sake of any searches that end up here. It's opcode 077E

 

 

077E: get_active_interior_to $ACTIVE_INTERIOR

 

Its for SA, he need it to VC

Link to comment
Share on other sites

For sake of any other person who tries to reply to a help topic, it's a good idea to read the full post carefully before replying.

Link to comment
Share on other sites

 

I used memory addresses when I needed to do this, this should help:    GTA VC Memory addresses

I already have that, but thanks anyway. My problem is that I don't know anything about CLEO so I'm reading a CLEO scrypt tutorial now. It's looking so complicated on the first look, but I said the same thing about scm scrypting basics and I managed to learn something about that.

Link to comment
Share on other sites

It's not hard, Just use this code:

 

 

:105E0: 0@ = read_memory 0x978810 size 4 virtual_protect 02:wait 0if0@ = 0 //-- Outside worldjf@1//Do sh*t if in interior

 

 

Replace 0 in the checking opcode with the number which relates to the interior you want, look at the image below for reference

 

user posted image

 

Link to comment
Share on other sites

The easiest way to check if someone is in an interior, by using an opcode like this:

 

 

02AD:   player $PLAYER_CHAR in_area 64.8222 613.6588 96.7488 550.3496 radius 20.0 sphere 0 

 

 

However, you will have to get the coordinates of the interior, but that shouldn't be so hard like learning CLEO from basics smile.gif.

Link to comment
Share on other sites

Sorrow, You put the assignment operator in your example instead of the comparison operator.

Link to comment
Share on other sites

CLEO IS SCM. What's there to learn, really? There's a few opcodes that you'll probably not understand, but that holds true for most of the regular opcodes too.

Link to comment
Share on other sites

 

Sorrow, You put the assignment operator in your example instead of the comparison operator.
@Link2012 - Please explain.

 

CLEO IS SCM. What's there to learn, really? There's a few opcodes that you'll probably not understand, but that holds true for most of the regular opcodes too.
@Deji - I learned something about scm scrypting only one month ago which means that I still have to learn and that's why CLEO is dificult for me.
Link to comment
Share on other sites

 

@Link2012 - Please explain.

SORROW CODE:

 

:105E0: 0@ = read_memory 0x978810 size 4 virtual_protect 02:wait 0if          // EXPLANATION HERE \/0@ = 0 //-- Defining that 0@ is equal to 0[b]![/b] The correct is 0@ == 0 (0@ is equal to 0[b]?[/b])jf@1//Do sh*t if in interior

 

Edited by Link2012
Link to comment
Share on other sites

Yes I already changed that but still nothing confused.gif . Here's what I exactly did:

 

create_thread @VCPDHQ     ----------------------------      :VCPDHQ  thread 'VCPDHQ'     :Memory    05E0: 0@ = read_memory 0x978810 size 4 virtual_protect 0        :Check    0001: wait 0     00D6: if       0039:   0@ == 12 // integer values     004D: else_jump @Memory        0002: jump @INSIDE:INSIDE    010D: Player.WantedLevel($PLAYER_CHAR) = 3    004E: end_thread

 

The idea is when a player enter a police station, 3 star wanted level will flash (this is NOT a CLEO and I build a scrypt for VC).

Edited by JACK JONES
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.