Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. DLC
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
      7. The Diamond Casino Heist
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA IV Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA SA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA VC Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA III Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Opius

GTA:SA Opcodes

Recommended Posts

Quadropheniac90

OK, sorry again for the double post, but I think the whole community should be able to enjoy this. So... I made a little script!

This makes three little planes follow you, and the camera is from the plane's perspective so you can make some nice screenshots, I've also marked what should be deleted if you don't want this camera option. Don't think these planes are harmless, sometimes they fire 5/10 rockets at you, per plane. Have fun everybody, steal it, eat it, do what you want with it! biggrin.gif Oh, and if the script is wrong, anyone, feel free to correct it!

 

It uses the stripped file from Steve-M... So backup your main.scm, back it up anyway, because this will overwrite your old file.

 

 

;--Request the models needed--:REQUEST0247: request_model #ARMY0247: request_model #RCBARON0247: request_model #CAMERA0247: request_model #NRG500;--Check if the models are indeed loaded--:CHECK0001: wait 0 ms00D6: if 30248:   model #RCBARON available0248:   model #ARMY available 0248:   model #CAMERA available0248:   model #NRG500 available004D: jump_if_false ££CHECK;--Create a getaway bike, 3 planes which attack you, 3 drivers because otherwise the planes won't fly.--;--Set the car density to 0, infinite run on, ignored by cops, and the player is invulnerable--:EXECUTE00A5: @2 = create_car #NRG500 at  0.0 10.0 $SpawnZ02AC: set_car @2 immunities  1  1  1  1  101B2: give_actor $PLAYER_ACTOR weapon  43 ammo  6000A5: @0 = create_car #RCBARON at  40.0 10.0 $SpawnZ0129: @1 = create_actor  23 #ARMY in_car @0 driverseat0841: @0  1084E: @0  108A2: @0 $PLAYER_ACTOR  10.000A5: @7 = create_car #RCBARON at  40.0 15.0 $SpawnZ0129: @9 = create_actor  23 #ARMY in_car @7 driverseat0841: @7  1084E: @7  108A2: @7 $PLAYER_ACTOR  10.000A5: @8 = create_car #RCBARON at  40.0 20.0 $SpawnZ0129: @10 = create_actor  23 #ARMY in_car @8 driverseat0841: @8  1084E: @8  108A2: @8 $PLAYER_ACTOR  10.001EB: set_car_density_to  0.001F7: set_player $PLAYER_CHAR ignored_by_cops_state_to  1 (true)0330: set_player $PLAYER_CHAR infinite_run_to  1 (true)02AB: set_actor $PLAYER_ACTOR immunities  1  1  1  1  1   ;--The camera settings--Delete this if you want the regular camera.--:CAMERA0001: wait 0 ms0407: create_coordinate @4 @5 @6 from_car @0 offset 0.0  -4.0  2.0015F: set_camera_position  @4 @5 @6  0.0  0.0  0.00159: camera_on_ped $PLAYER_ACTOR  15  20002: jump ££CAMERA

 

 

EDIT: @Opius, thanks. biggrin.gif I do what I can!

Edited by teun.steenbekkers

Share this post


Link to post
Share on other sites
steve-m

004D: jump_if_false ££MAIN_2

Erm, this should jump to :CHECK, no?

Share this post


Link to post
Share on other sites
nubbel

Hell, these RC-Barons are fun! tounge.gif

 

 

@Nubbel: Great discovery, if you don't want me to produce some pictures or something, tell me. I don't wanna go off and steal your discovery or something, just that you know.  I'll post some nice screenshots when I make them.

 

These are just some opcodes I found. They are for use, so use them! tounge2.gif

Share this post


Link to post
Share on other sites
Demarest

@PatrickW: OK, but as far as I know, not a single other opcode has been used to make one actor kill another one.
Search the database for kill and you come up with 01C9.

 

 

0750: @2  0

 

Makes object @2 invisible (0) or visible again (1)

Is there more to it than that? There's already an opcode for toggle model render.

 

 

Are you sure? Because I dont think thats true. Get in a Helicopter yourself and let another one folow you. Doesn't look like they are flying 30 feet above you.
That depends on which of you has done more research. 30 feet above you IS a radius of 30. I'm not sure how you'd differentiate between the two, but I'll let you guys figure that out.

 

@teun: Craig had the drive by on actor opcode defined fairly well. Don't remember if he posted here or not though. Good work on the aircraft testing. I never would've guessed that vehicles without weapons would fire weapons! But this is a pretty dedicated thread. Maybe make your own threads for releasing scripts and such.

Share this post


Link to post
Share on other sites
Quadropheniac90

OK, I'll make my own topic if I come up with something.

 

@Steve-M: Yeah, the label was :MAIN_2 before and I forgot to rename that one.

 

Let's see, what else can I find out...

 

EDIT: Maybe there's an opcode for activating the smoke trail behind an airplane and maybe that also works on other planes. I'm gonna hunt something down. biggrin.gif

Edited by teun.steenbekkers

Share this post


Link to post
Share on other sites
Quadropheniac90

05CA: unknown_action_sequence $PLAYER_ACTOR @0  10000  2

 

 

I know someone has allready discovered this, but I don't think anyone has explained the last parameter yet.

 

0 = First passenger seat, next to the driver.

1 = Second passenger seat, the left side.

2 = Third passenger seat, the right side.

 

I tested this with a Sentinel, and I bet 4 will crash the game.

Share this post


Link to post
Share on other sites
spaceeinstein
If anyone wants the latest SASCM.ini with most of the new opcodes, download my mod. So if an unknown opcode is not in the ini and the database, then post here. Edited by spaceeinstein

Share this post


Link to post
Share on other sites
Demarest

 

If anyone wants the latest SASCM.ini with most of the new opcodes, download my mod. So if an unknown opcode is not in the ini and the database, then post here.

"my mod" like you only have one. No link either. Why not bother hosting it separately for those only in need of the INI? That's what I did with GTA3. Otherwise, it's good of you to do that.

 

[EDIT]

Found it. Extracted it and rehosted here. Download is 18KB. Be sure to backup your original.

 

[EDIT2]

@space: What method did you use to create this? I've already found stuff missing. Did you only add the ones YOU found, or everybody's??

Edited by Demarest

Share this post


Link to post
Share on other sites
Quadropheniac90

I've been having problems with:

 

put_actor $PLAYER_ACTOR in_car $carID

 

The player will be standing in the car, rather than just sitting in it as he is supposed to do. I've heard from others they don't have this problem, but for the ones who have, I use this as a solution:

 

05CB: unknown_action_sequence $PLAYER_ACTOR $carID  0

 

This opcode (allready discovered, just explaining stuff to who don't know yet... smile.gif ) places CJ in car $carID, the last integer is how long CJ is allowed to spend on this action. biggrin.gif If he's not there in that time, he will be spawned to the car. I set it to 0 so he will be in the car right away. And I must say it works like a charm. biggrin.gif Hope this is useful to people who have the same irritating problem as I do.

 

EDIT: Huh? I tested this:

 

05BE: unknown_action_sequence $PLAYER_ACTOR

 

And I was like, what the hell?! Killing me?! biggrin.gif It's the action sequence that wastes you. Maybe there's a busted one...

Edited by teun.steenbekkers

Share this post


Link to post
Share on other sites
spaceeinstein
Most of them are in there. Not all. Edited by spaceeinstein

Share this post


Link to post
Share on other sites
BBumper

 

Are you sure? Because I dont think thats true. Get in a Helicopter yourself and let another one folow you. Doesn't look like they are flying 30 feet above you.
That depends on which of you has done more research. 30 feet above you IS a radius of 30. I'm not sure how you'd differentiate between the two, but I'll let you guys figure that out.

 

 

Looks like you are right Demarest it actually makes that helicopter fly above the target at (Number) feet at a distance of (Number) feet, once I can find a host I'll upload the video.

 

 

 

Edit: Video

 

Note on center value its the value that I've pre-programed the helicopter to fly at, the first value (left) is the height the heli is currently flying at above the target (player) and the third value (right) is the distance between the target (player).

Edited by BBumper

Share this post


Link to post
Share on other sites
DaEllum67

@nubbel:

Have you tested the tank? Maybe it can attack. These opcodes look good, now I actually create hunter vigilante aids like I 've been trying biggrin.gif.

Share this post


Link to post
Share on other sites
Demarest
Most of them are in there. Not all.

Well for the ones that popped up today, that makes sense. But I noticed one not in there from a few days ago where ones ahead of it were in. notify.gif

Share this post


Link to post
Share on other sites
Quadropheniac90

Gone.

Edited by teun.steenbekkers

Share this post


Link to post
Share on other sites
Quadropheniac90

Gone.

Edited by teun.steenbekkers

Share this post


Link to post
Share on other sites
Quadropheniac90

Srry, triple post, got some stuff here though.

 

Hope this is new:

 

070F: $planeID  0.0  -20.0  100.0

 

 

The plane wants to stay at the height, which is the last parameter, the first 2 aren't coordinates though, they wouldn't fly to me, but I did put my coordinates there though.

 

The Police Maverick will also fire rockets, but I only enabled the follow opcode, not the'fire rockets at my ass' opcode. dontgetit.gif The Leviathan (or something like that) also fires rockets, so does the SA News Heli, the Sea Sparrow is also quite dangerous, damn, I thought heli's weren't any fun, but deleting one opcode can lead to interesting results, I'd say. The Sparrow and RC Raider killed me fast too, the Maverick too, the RC Goblin is also fun, surprisingly the Cargobob took longer then 2 seconds to kill me, 3 seconds to be precise. biggrin.gif The Raindance shot quite some rockets at me, and that was it for the helicopters.

 

Sorry if I can't put this here, but I thought this would be useful, so, and all of the heli's fired rockets at me.

 

The helicopters/planes won't chase anybody else... Weird...

 

The opcodes for the planes won't work and I can't find any opcode which fires rockets for the Rhino.

 

Shooting cars & bikes! Hope you like it, still very buggy though!

 

I made bikes and cars shoot me with rockets, the machine gun does not work on either of them. I cans till make them drive towards me, but the opcode nubbel found requires the other opcode, which makes helicopters follow you. The problem is, the cars and bikes aren't helicopters and won't move. So they either shoot you, or they come to you. I didn't get both to work at the same time. biggrin.gif I hope people like this 'discovery', if it is a discovery.

 

To make this work, put the code I put in my own thread ingame and replace the 'car' or 'bike' flag with a 'heli' flag.

 

I hope you like this, and please help me to make this better, like the player being able to fire these rockets, and making the cars drive and shoot at the same time. This would really help me, and probably others.

 

Have fun killing yourself with this! biggrin.gif

Edited by teun.steenbekkers

Share this post


Link to post
Share on other sites
nubbel
Are you sure? Because I dont think thats true. Get in a Helicopter yourself and let another one folow you. Doesn't look like they are flying 30 feet above you.
That depends on which of you has done more research. 30 feet above you IS a radius of 30. I'm not sure how you'd differentiate between the two, but I'll let you guys figure that out.

 

 

Looks like you are right Demarest it actually makes that helicopter fly above the target at (Number) feet at a distance of (Number) feet, once I can find a host I'll upload the video.

 

 

 

Edit: Video

 

Note on center value its the value that I've pre-programed the helicopter to fly at, the first value (left) is the height the heli is currently flying at above the target (player) and the third value (right) is the distance between the target (player).

Please make the same video while flying in a heli yourself and while standing on a higher building wink.gif

Share this post


Link to post
Share on other sites
Quadropheniac90

 

Jay, I can post again without quadruple posting, can anyone help me with the bike prob? It either shoots me or follows me, as far as I know it won't do both, with the following opcode enabled. Because that opcode just handles helicopters, and not bikes, that sucks. Unmessed my previous post.

Edited by teun.steenbekkers

Share this post


Link to post
Share on other sites
poopskin

what's a opcode? yer losin' me. i know only 5% of what the code in san andreas:

popcycle

models

textures!

Share this post


Link to post
Share on other sites
Demarest
what's a opcode? yer losin' me. i know only 5%

Then get out of a specialized thread and start at the beginning. It's having a hard time remaining focused as it is confused.gif

Share this post


Link to post
Share on other sites
Quadropheniac90
Is that my fault? Sorry for that then... smile.gif

Share this post


Link to post
Share on other sites
AdTec_224

I don't know whether this has been discovered yet:

 

 

0464: put_actor $PLAYER_ACTOR into_turret_on_car [email protected] at_car_offset 0.0 0.0 0.0 unknown 1 angle 0.0 with_weapon 0

 

 

This part of the code chages the position of the actor:

 

 

unknown 0

 

 

0 = Face Front Of Car

 

1 = Face Left Of Car

 

2 = Face Back Of Car

 

3 = Face Right Of Car

 

4 upward = Face Front Of Car Again

Share this post


Link to post
Share on other sites
BBumper
Are you sure? Because I dont think thats true. Get in a Helicopter yourself and let another one folow you. Doesn't look like they are flying 30 feet above you.
That depends on which of you has done more research. 30 feet above you IS a radius of 30. I'm not sure how you'd differentiate between the two, but I'll let you guys figure that out.

 

 

Looks like you are right Demarest it actually makes that helicopter fly above the target at (Number) feet at a distance of (Number) feet, once I can find a host I'll upload the video.

 

 

 

Edit: Video

 

Note on center value its the value that I've pre-programed the helicopter to fly at, the first value (left) is the height the heli is currently flying at above the target (player) and the third value (right) is the distance between the target (player).

Please make the same video while flying in a heli yourself and while standing on a higher building wink.gif

I could make a video of myself in a helicopter and use that same code on a vehicle obviously the vehicle isn't going to fly because it wasn't coded to do that but I digress and agree that particular opcode basically tells the aircraft to fly at a certain (radius) from the target. blush.gif

Share this post


Link to post
Share on other sites
Quadropheniac90

This isn't really a discovery, but actors can fire heatseeking rocketlaunchers... And does anybody know if it's possible to change 'content' of an opcode, what it does, because I'm having trouble with this:

 

0724: $helicopterID $PLAYER_ACTOR  30.0

 

This makes helicopter $helicopterID follow the player around and fire missiles at him, that's what nubbel found. But I can use it on every other vehicle, and they will shoot missiles too. But what the other vehicles won't do, is follow you around, because this was meant for helicopters. So I just want to know, is it possible to keep the opcode it's 'fire missiles' function, but remove the 'following around' function. It is probably not possible, and this was quite a noobquestion, so... It'd be cool though.

Share this post


Link to post
Share on other sites
Demarest
I thought nubbel already outlined that there's different commands for firing upon and pursuing, no?

Share this post


Link to post
Share on other sites
Quadropheniac90

No, I think nubbel made a mistake, he said this is a helicopter attacking you with it's machine gun:

 

0841: @0  10724: @0 $PLAYER_ACTOR  30.0

 

 

Which is true, but it will also attack you with it's rockets. This will make it follow you and shoot rockets at you:

 

0724: @0 $PLAYER_ACTOR  30.0

 

 

But this alone won't do a thing, at least not with cars, didn;t test heli's.

 

084E: @0  1 or 0841: @0  1

 

 

And that sucks, because if it would work for other vehicles alone, I could make it fire, even the action sequences and driver behaviour don't work, it makes the car drive towards you, but not fire missiles. So I guess it's one, or another. sad.gif

Share this post


Link to post
Share on other sites
spaceeinstein

Pavel's discovery

0A19: display_zone_text 'MARKS' (CAN ONLY BE SEEN IF SCREEN IS FADED)

0583: player $PLAYER_CHAR in_zone 'GAN1' (was not sure by Barton)

0638: action_sequence actor @1 stand_still 1

09CA: set_object $WALL immunities 1 1 1 0 1 blink.gif

 

0A26 forces the radio to Playback FM but there is already an opcode that sets the radio...

Edited by spaceeinstein

Share this post


Link to post
Share on other sites
cns
0A26 forces the radio to Playback FM but there is already an opcode that sets the radio...[/color]

maybe it is opcode that activates in tunning garages?!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 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.