Jump to content

Is there a way in VC


Node

Recommended Posts

Okay so im in cleo in vc and have used this opcode:

 

 

02D4: car $5617 turn_off_engine

 

 

But i cannot get the engine to start, i have to keep exiting the car and getting back in again confused.gif

Link to comment
Share on other sites

If I remember maxorator posted some notes about turning engine off at the "describing VC memory addresses" topic.

 

Ah here you go.

 

 

009B6A80 + 0x050 - 1B Word  - Some flags

0x08 > Driving disabled. Enable this flag and you won't be able to drive it (no acceleration nor turning). This is reset when leaving and entering the car.

0x10 > The car jumps to a random location. Often crashes.

0x20 > Same as 0x08.

0x40 > Same as 0x08.

0x80 > Same as 0x08.

 

 

But it is always crashing me confused.gif. Try it however.

Link to comment
Share on other sites

I'm not very good at memory adresses as ive had very little experience with them, so if someone could explain how to use these codes to turn the engine on ill appreciate it smile.gif

Link to comment
Share on other sites

If I remember maxorator posted some notes about turning engine off at the "describing VC memory addresses" topic.

 

Ah here you go.

 

 

009B6A80 + 0x050 - 1B Word  - Some flags

0x08 > Driving disabled. Enable this flag and you won't be able to drive it (no acceleration nor turning). This is reset when leaving and entering the car.

0x10 > The car jumps to a random location. Often crashes.

0x20 > Same as 0x08.

0x40 > Same as 0x08.

0x80 > Same as 0x08.

 

 

But it is always crashing me confused.gif. Try it however.

That doesn't really have anything to do with engine. The engine toggle is Vehicle + 0x1F9 flag 0x10.

Link to comment
Share on other sites

I'm not very good at memory adresses as ive had very little experience with them, so if someone could explain how to use these codes to turn the engine on ill appreciate it smile.gif
Link to comment
Share on other sites

I'm not a VC coder, so I'll apply what @maxorator said literally:

 

0A97: 0@ = car $PLAYER_CAR struct0@ += 0x1F9 0A8D: 1@ = read_memory 0@ size 1 virtual_protect 0 08BA: set 1@ bit 5 0A8C: write_memory 0@ size 1 value 1@ virtual_protect 0 

 

Use 08C0 to turn off the car engine. Obviously, this is untested.

Link to comment
Share on other sites

I give up, i have cleo 4 installed for VC but sanny builder thinks differently. It tells me i dont have cleo and to "press the cleo button in the bottom corner" even though theres no "cleo button" there.

Link to comment
Share on other sites

Wesser's code is good, but it is for SA. After a few modifications, this should work (with comments)

 

 

00D9: 0@ = actor $PLAYER_ACTOR car //players car, or use opcode 03C005E7: 0@ = car 0@ struct //the cars pointer0@ += 0x1F9 //engine offset05E0: 1@ = read_memory 0@ size 1 virtual_protect 0 //get the current engine statusif 1@ = bla bla etc. // check if its off, then turn on or its on and turn off0A8C: write_memory 0@ size 1 value 1 virtual_protect 0 //write the engine value to 1 (engine on)

 

 

If it won't work, try to change virtual protect to 1.

Edited by krasiejow
Link to comment
Share on other sites

Ouch my bad. For memory write, in VC we use:

 

 

05DF: write_memory 0@ size 1 value 1 virtual_protect 0

 

 

It will say "no CLEO found", because you are trying to use some SA's CLEO opcodes (like 0A8C).

Link to comment
Share on other sites

Okay, it compiles but the game crashes after pressing the key needed to turn the engine on confused.gif

Link to comment
Share on other sites

Maybe you should set only the fifth bit. Unfortunately, there's no set-bit opcode for VC. sad.gif

Link to comment
Share on other sites

I think it's possible to write a simple function in a script, something like

 

mov eax, dword ptr ds:[1@]xor eax, 10hmov dword ptr ds:[1@], eaxret

 

The offset to 1@ is

 

Thread pointer +0x40

 

Then call this function with CLEO opcodes.

 

Edit

Woops! You just need this

 

05FB: 1@ = 1@ XOR 0x10

 

It's CLEO-VC opcode.

Edited by DK22Pac
Link to comment
Share on other sites

Edit

Woops! You just need this

 

05FB: 1@ = 1@ XOR 0x10

 

It's CLEO-VC opcode.

Where do i put this :S

Link to comment
Share on other sites

Untested, but should work.

 

 

00D9: 0@ = actor $PLAYER_ACTOR car05E7: 0@ = car 0@ struct000A: 0@ += 0x1F905E0: 1@ = read_memory 0@ size 1 virtual_protect 005FB: 1@ = 1@ XOR 0x100A8C: write_memory 0@ size 1 value 1@ virtual_protect 0

 

 

@DK22

Perhaps you have a VC IDB file? on public.sannybuilder.com there's only III and SA IDBs sad.gif

Link to comment
Share on other sites

Using the opcode:

 

0A8C: write_memory 0@ size 1 value 1@ virtual_protect 0

 

 

Gives me an error "Opcode 0A8C require CLEO library being installed.Install it by clicking the word CLEO on the bottom panel."

Now i have cleo 4 installed for VC and there is no cleo button at the bottom. So sanny isn't recognizing my cleo

Link to comment
Share on other sites

Damn, then use VC writemem opcode!

Link to comment
Share on other sites

ThirteenAG
Untested, but should work.

 

 

00D9: 0@ = actor $PLAYER_ACTOR car05E7: 0@ = car 0@ struct000A: 0@ += 0x1F905E0: 1@ = read_memory 0@ size 1 virtual_protect 005FB: 1@ = 1@ XOR 0x100A8C: write_memory 0@ size 1 value 1@ virtual_protect 0

 

 

@DK22

Perhaps you have a VC IDB file? on public.sannybuilder.com there's only III and SA IDBs sad.gif

VC IDB - http://sannybuilder.com/forums/viewtopic.php?id=849

Link to comment
Share on other sites

Thanks, it will be damn useful for any VC mods, as I completely don't have any ideas for non-memory VC CLEO mod.

Link to comment
Share on other sites

ThirteenAG
Thanks, it will be damn useful for any VC mods, as I completely don't have any ideas for non-memory VC CLEO mod.

Yeah, all my VC mods can't be done without it.

Link to comment
Share on other sites

*facepalm* clicked on the link and no "caphica" thingy appears so i cannot see what numbers/letters to put in the box suicidal.gif

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.