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

    1. GTANet.com

    1. GTA Online

      1. The Cayo Perico Heist
      2. The Diamond Casino Heist
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

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

    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA VI

      1. St. Andrews Cathedral
    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
    6. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    7. GTA III

      1. Guides & Strategies
      2. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

    1. Announcements

    2. Support

    3. Suggestions

Opius

GTA:SA Opcodes

Recommended Posts

Silent

 

0606: unknown_create_at_rectangle_cornerA -1695.1 587.6 cornerB -1771.3 -1310.00607: unknown_remove_0606 

 

 

->

 

 

0606: create_forbidden_for_scripted_cars_cornerA -1695.1 587.6 cornerB -1771.3 -1310.00607: remove_forbidden_for_scripted_cars

 

 

Opcodes used only in Highjack mission to prevent truck driving off the highway (that's why 0607 has no params). However I don't know how many forbiddens can be placed at one time.

 

BTW. Why that topic isn't pinned? confused.gif

Edited by SilentPL

Share this post


Link to post
Share on other sites
spaceeinstein

It's "pinned" at the very top of this forum.

Share this post


Link to post
Share on other sites
Deji

I forgot to post this here, again..

 

(copied)

 

For teh discoveries of this one, I created a small CLEO Script.

 

Use it with a stripped .scm (or any one where you spawn in grove). Watch the Cheetah as it slowly drives off, but stay within Grove Street.

 

When it gets to the end of the road (the crossroad bit), start pressing TAB.

 

 

{$CLEO}hex00 00endwait 10000247: load_model #CHEETAHwhile 8248:   not model #CHEETAH available   wait 0end00A5: [email protected] = create_car #CHEETAH at 2501.1951 -1661.1289 13.0496009A: [email protected] = create_actor_pedtype 4 model #MALE01 at 0.0 0.0 0.00175: set_car [email protected] Z_angle_to 90.0036A: put_actor [email protected] in_car [email protected]: AS_actor [email protected] drive_car [email protected] to 2263.7698 -1659.3094 14.9 speed 5.0 1 model #NULL 2while true   wait 0   if       00E1:   player 0 pressed_key 4   then       if   0039: [email protected] == 1       then 0006: [email protected] = 0       else 0006: [email protected] = 1       end       0594: unknown_car [email protected] flag [email protected]   end   0AD0: show_formatted_text_lowpriority "%d" time 1 [email protected]

 

 

n my experience.. Every time you press TAB (no matter whether your setting the opcode to 1 or 0) the whole model appears to reload. Not too sure why... but at least were getting something!

 

The IDB indicates it has something to do with rendering the distant model clump.. but I know little about modelling... So I'm not sure what that is about. Holding TAB will make the car look invisible when viewing from far away smile.gif

Share this post


Link to post
Share on other sites
Silent

Lucky opcodes finding day? Some finds done together with Deji.

 

 

020B: explode_car [email protected] // versionA070C: explode_car [email protected] // versionB

 

 

->

 

 

020B: explode_car [email protected]: explode_car_without_radius_damage [email protected]

 

 

070C explosion is 'safe' to everything that is near exploding car.

 

 

 

 

0730: car [email protected] damage_component 1 // versionA 073C: car [email protected] damage_component 0 // versionB

 

 

->

 

 

0730: car [email protected] damage_componentA 1073C: car [email protected] damage_componentB 0

 

 

All car components opcode have 'componentA', 'componentB', so why that opcodes have to be formatted in other way?

 

 

 

 

0950: set_trip_skip 2263.378 -2226.33 12.4 angle 47.416 // versionA 09AF: set_trip_skip 2097.009 1728.285 9.8203 angle 169.1748 // versionB 0A35: trip_skip 2453.8 -1305.0 22.5 angle 0.0 when_in_car [email protected] 0A36:   unknown_trip_skip_check 

 

 

->

 

 

0950: set_trip_skip 2263.378 -2226.33 12.4 angle 47.41609AF: set_trip_skip_after_mission 2097.009 1728.285 9.8203 angle 169.17480A35: trip_skip 2453.8 -1305.0 22.5 angle 0.0 when_in_car [email protected] finished_by_script0A36:   trip_skip_finished_by_script_is_ready_to_fade_in

 

 

09AF is called in one mission when mission is failed, but works similar to 0950 (IMO 09AF fades in slighty faster).

0A35 skips fade in.

0A36 returns true (for a moment) when 0A35 teleported car to selected location.

 

No, we won't stop with that findings turn.gif

Edited by SilentPL

Share this post


Link to post
Share on other sites
Deji

Would you believe it? Only 129 unknown opcodes (including known ones with unknown parameters)... We've found 1944 opcodes!

 

In case I neglect these topics, I've started adding opcodes I've recently changed to the Newly Modified category (thanks for the suggestion as well, Adler tounge.gif) so it's easier to tell what has been updated in the .ini's and opcodes.txt.

 

Probably useful, considering Silent is encouraging so many finds lately tounge2.gif

Share this post


Link to post
Share on other sites
ZAZ

@Deji: i allready posted the meaning of this opcode here

 

09BD: Extern_Script_Status_flag 1

 

but in your database you wrote allow_other_threads_to_display_text_boxes 1

Share this post


Link to post
Share on other sites
GaryRoachSanderson

I have a question about the new CLEO 4 Opcode below:

 

0AE2: [email protected] = random_vehicle_near_point [email protected] [email protected] [email protected] in_radius 1000.0 find_next 0 pass_wrecked 1

 

From what I have tested, it is no different from CLEO 3's

 

0327: $TEMPVAR_ACTOR_CAR = get_random_car_with_model -1 in_rectangle_cornerA $111 $112 cornerB $114 $115

 

because it only gets random vehicles that are not handled by any cleo script or the main.scm, or can someone explain to me how to use that opcode properly or are there any alternative methods of getting a random vehicle? Including cop vehicles and those created by other cleo scripts or the main.scm that have not removed references to vehicles in their respective scripts.

 

P.S.: I have tried using memory hacking to get all random vehicles before but it is extremely slow.

 

Share this post


Link to post
Share on other sites
spaceeinstein

It's an if/set opcode so you can use the opcode as a condition in an if statement.

Share this post


Link to post
Share on other sites
Deji
@Deji: i allready posted the meaning of this opcode here

 

09BD: Extern_Script_Status_flag 1

 

but in your database you wrote allow_other_threads_to_display_text_boxes 1

It's easier for me to go along with a description and example of the opcode use smile.gif Helps me document the parameter info and description in the database. NTA did just that: 09BD Search.

 

0A44 indeed relates to 09BD and is checked by some text opcodes... So I'm not sure what to go with here.

Share this post


Link to post
Share on other sites
Seemann

Ok, lets explain. In my opinion 09BD does not work correctly. I guess Rockstar messed the flags there. Let me show what this opcode actually does:

 

 

.text:004797B6     _opcode_09BD:                                              ; DATA XREF: .text:00479C70o.text:004797B6 134                     push 1                                 ; ParamsNumber.text:004797B8 138                     mov ecx, esi.text:004797BA 138                     call CRunningScript__CollectParameters.text:004797BF 134                     mov eax, ds:dwOpcodeParameter1.text:004797C4 134                     test eax, eax.text:004797C6 134                     jz  short loc_4797E4.text:004797C8 134                     mov [esi+CScriptThread.field_C8], 1.text:004797CF 134                     mov ds:DisableTextBoxes, 1.text:004797D6 134                     mov ds:DisableTextBoxesOverride, 0.text:004797DD 134                     xor al, al.text:004797DF 134                     jmp loc_479ADE.text:004797E4    ; ---------------------------------------------------------------------------.text:004797E4.text:004797E4     loc_4797E4:                                                ; CODE XREF: OpcodeSelector_25_0960_09C3+17C6j.text:004797E4 134                     mov [esi+CScriptThread.field_C8], 0.text:004797EB 134                     mov ds:DisableTextBoxes, 0.text:004797F2 134                     mov ds:DisableTextBoxesOverride, 1.text:004797F9 134                     xor al, al.text:004797FB 134                     jmp loc_479ADE

 

 

If the opcode 09BD parameter is 0:

 

DisableTextBoxes = 0

DisableTextBoxesOverride = 1

thread.0xC8 = 0

 

If the opcode 09BD parameter is not 0:

 

DisableTextBoxes = 1

DisableTextBoxesOverride = 0

thread.0xC8 = 1

 

Ok, clear enough. Lets see 0a44:

 

 

.text:0047A539     _opcode_0A44:                                              ; DATA XREF: .text:0047A734o.text:0047A539 1D0                     push 1                                 ; ParamsNumber.text:0047A53B 1D4                     mov ecx, edi.text:0047A53D 1D4                     call CRunningScript__CollectParameters.text:0047A542 1D0                     mov eax, ds:dwOpcodeParameter1.text:0047A547 1D0                     test eax, eax.text:0047A549 1D0                     setnz al.text:0047A54C 1D0                     mov ds:DisableTextBoxesOverride, al.text:0047A551 1D0                     xor al, al.text:0047A553 1D0                     jmp _end

 

 

If the opcode 0A44 parameter is 0:

 

DisableTextBoxesOverride = 0

 

If the opcode 0A44 parameter is not 0:

 

DisableTextBoxesOverride = 1

 

Still clear. And now, let see how these flags are used (opcode 03e5):

 

 

.text:00485617 1A8                     mov al, ds:DisableTextBoxesOverride.text:0048561C 1A8                     test al, al.text:0048561E 1A8                     jnz short _show_textbox.text:00485620 1A8                     mov al, [esi+CScriptThread.field_C8].text:00485626 1A8                     test al, al.text:00485628 1A8                     jnz short _show_textbox.text:0048562A 1A8                     mov al, ds:DisableTextBoxes.text:0048562F 1A8                     test al, al.text:00485631 1A8                     jnz short _skip_box.text:00485633.text:00485633     _show_textbox:                                             ; CODE XREF: OpcodeSelector_10_0384_03E7+1A4Ej.text:00485633                                                                ; OpcodeSelector_10_0384_03E7+1A58j.text:00485633 1A8                     push 0                                 ; char.text:00485635 1AC                     push 0                                 ; char.text:00485637 1B0                     push 0                                 ; char.text:00485639 1B4                     push edi                               ; Msg.text:0048563A 1B8                     call ShowTextBox.text:0048563F 1B8                     mov al, ds:TextShown.text:00485644 1B8                     add esp, 10h.text:00485647 1A8                     test al, al.text:00485649 1A8                     jz  short _skip_box.text:0048564B 1A8                     push 0                                 ; int.text:0048564D 1AC                     or  ebx, -1.text:00485650 1AC                     push ebx                               ; int.text:00485651 1B0                     push ebx                               ; int.text:00485652 1B4                     push ebx                               ; int.text:00485653 1B8                     push ebx                               ; int.text:00485654 1BC                     push ebx                               ; int.text:00485655 1C0                     push ebx                               ; int.text:00485656 1C4                     push edi                               ; int.text:00485657 1C8                     call AddTextToBrief.text:0048565C 1C8                     add esp, 20h.text:0048565F.text:0048565F     _skip_box:                                                 ; CODE XREF: OpcodeSelector_10_0384_03E7+1A61j.text:0048565F                                                                ; OpcodeSelector_10_0384_03E7+1A79j.text:0048565F 1A8                     mov ds:TextShown, 1.text:00485666 1A8                     xor al, al.text:00485668 1A8                     jmp short _end

 

 

_show_textbox block calls the functions showing the black text box. Firstly the game checks the flags:

 

 

.text:00485617 1A8                     mov al, ds:DisableTextBoxesOverride.text:0048561C 1A8                     test al, al.text:0048561E 1A8                     jnz short _show_textbox

 

 

If DisableTextBoxesOverride 0 immediately go to _show_textbox, otherwise follow

 

 

.text:00485620 1A8                     mov al, [esi+CScriptThread.field_C8].text:00485626 1A8                     test al, al.text:00485628 1A8                     jnz short _show_textbox

 

 

If thread.0xC8 0 immediately go to _show_textbox, otherwise follow

 

 

.text:0048562A 1A8                     mov al, ds:DisableTextBoxes.text:0048562F 1A8                     test al, al.text:00485631 1A8                     jnz short _skip_box

 

 

If DisableTextBoxes 0 immediately go to _skip_box, otherwise show text box.

 

So, we will skip the text box showing only when:

 

DisableTextBoxesOverride = 0

thread.0xC8 = 0

DisableTextBoxes = 1

 

Now go back to 09BD and 0A44 and find where it's possible. Nowhere.

 

That's why I stucked there when exploring these opcodes and left them unknown. By using memory changing opcodes for sure it's possible to lock text box displaying, but it's not game original way.

Share this post


Link to post
Share on other sites
-ATP-

Hi,

anybody know what the results of this OpCode mean?

 

08EC: $TEMPVAR_CAR_TYPE = car $TEMPVAR_ACTOR_CAR type

 

For example:

0 = Car

1 = Bike

etc.

Share this post


Link to post
Share on other sites
ZAZ

 

Ok, lets explain. In my opinion 09BD does not work correctly. I guess Rockstar messed the flags there. Let me show what this opcode actually does:

 

 

.text:004797B6     _opcode_09BD:                                              ; DATA XREF: .text:00479C70o.text:004797B6 134                     push 1                                ; ParamsNumber.text:004797B8 138                     mov ecx, esi.text:004797BA 138                     call CRunningScript__CollectParameters.text:004797BF 134                     mov eax, ds:dwOpcodeParameter1.text:004797C4 134                     test eax, eax.text:004797C6 134                     jz  short loc_4797E4.text:004797C8 134                     mov [esi+CScriptThread.field_C8], 1.text:004797CF 134                     mov ds:DisableTextBoxes, 1.text:004797D6 134                     mov ds:DisableTextBoxesOverride, 0.text:004797DD 134                     xor al, al.text:004797DF 134                     jmp loc_479ADE.text:004797E4    ; ---------------------------------------------------------------------------.text:004797E4.text:004797E4     loc_4797E4:                                                ; CODE XREF: OpcodeSelector_25_0960_09C3+17C6j.text:004797E4 134                     mov [esi+CScriptThread.field_C8], 0.text:004797EB 134                     mov ds:DisableTextBoxes, 0.text:004797F2 134                     mov ds:DisableTextBoxesOverride, 1.text:004797F9 134                     xor al, al.text:004797FB 134                     jmp loc_479ADE

 

 

If the opcode 09BD parameter is 0:

 

DisableTextBoxes = 0

DisableTextBoxesOverride = 1

thread.0xC8 = 0

 

If the opcode 09BD parameter is not 0:

 

DisableTextBoxes = 1

DisableTextBoxesOverride = 0

thread.0xC8 = 1

 

Ok, clear enough. Lets see 0a44:

 

 

.text:0047A539     _opcode_0A44:                                              ; DATA XREF: .text:0047A734o.text:0047A539 1D0                     push 1                                ; ParamsNumber.text:0047A53B 1D4                     mov ecx, edi.text:0047A53D 1D4                     call CRunningScript__CollectParameters.text:0047A542 1D0                     mov eax, ds:dwOpcodeParameter1.text:0047A547 1D0                     test eax, eax.text:0047A549 1D0                     setnz al.text:0047A54C 1D0                     mov ds:DisableTextBoxesOverride, al.text:0047A551 1D0                     xor al, al.text:0047A553 1D0                     jmp _end

 

 

If the opcode 0A44 parameter is 0:

 

DisableTextBoxesOverride = 0

 

If the opcode 0A44 parameter is not 0:

 

DisableTextBoxesOverride = 1

 

Still clear. And now, let see how these flags are used (opcode 03e5):

 

 

.text:00485617 1A8                     mov al, ds:DisableTextBoxesOverride.text:0048561C 1A8                     test al, al.text:0048561E 1A8                     jnz short _show_textbox.text:00485620 1A8                     mov al, [esi+CScriptThread.field_C8].text:00485626 1A8                     test al, al.text:00485628 1A8                     jnz short _show_textbox.text:0048562A 1A8                     mov al, ds:DisableTextBoxes.text:0048562F 1A8                     test al, al.text:00485631 1A8                     jnz short _skip_box.text:00485633.text:00485633     _show_textbox:                                            ; CODE XREF: OpcodeSelector_10_0384_03E7+1A4Ej.text:00485633                                                                ; OpcodeSelector_10_0384_03E7+1A58j.text:00485633 1A8                     push 0                                ; char.text:00485635 1AC                     push 0                                ; char.text:00485637 1B0                     push 0                                ; char.text:00485639 1B4                     push edi                              ; Msg.text:0048563A 1B8                     call ShowTextBox.text:0048563F 1B8                     mov al, ds:TextShown.text:00485644 1B8                     add esp, 10h.text:00485647 1A8                     test al, al.text:00485649 1A8                     jz  short _skip_box.text:0048564B 1A8                     push 0                                ; int.text:0048564D 1AC                     or  ebx, -1.text:00485650 1AC                     push ebx                              ; int.text:00485651 1B0                     push ebx                              ; int.text:00485652 1B4                     push ebx                              ; int.text:00485653 1B8                     push ebx                              ; int.text:00485654 1BC                     push ebx                              ; int.text:00485655 1C0                     push ebx                              ; int.text:00485656 1C4                     push edi                              ; int.text:00485657 1C8                     call AddTextToBrief.text:0048565C 1C8                     add esp, 20h.text:0048565F.text:0048565F     _skip_box:                                                ; CODE XREF: OpcodeSelector_10_0384_03E7+1A61j.text:0048565F                                                                ; OpcodeSelector_10_0384_03E7+1A79j.text:0048565F 1A8                     mov ds:TextShown, 1.text:00485666 1A8                     xor al, al.text:00485668 1A8                     jmp short _end

 

 

_show_textbox block calls the functions showing the black text box. Firstly the game checks the flags:

 

 

.text:00485617 1A8                     mov al, ds:DisableTextBoxesOverride.text:0048561C 1A8                     test al, al.text:0048561E 1A8                     jnz short _show_textbox

 

 

If DisableTextBoxesOverride <> 0 immediately go to _show_textbox, otherwise follow

 

 

.text:00485620 1A8                     mov al, [esi+CScriptThread.field_C8].text:00485626 1A8                     test al, al.text:00485628 1A8                     jnz short _show_textbox

 

 

If thread.0xC8 <> 0 immediately go to _show_textbox, otherwise follow

 

 

.text:0048562A 1A8                     mov al, ds:DisableTextBoxes.text:0048562F 1A8                     test al, al.text:00485631 1A8                     jnz short _skip_box

 

 

If DisableTextBoxes <> 0 immediately go to  _skip_box, otherwise show text box.

 

So, we will skip the text box showing only when:

 

DisableTextBoxesOverride = 0

thread.0xC8 = 0

DisableTextBoxes = 1

 

Now go back to 09BD and 0A44 and find where it's possible. Nowhere.

 

That's why I stucked there when exploring these opcodes and left them unknown. By using memory changing opcodes for sure it's possible to lock text box displaying, but it's not game original way.

Seems to be difficult to analyse the programming structure but in simple mission coding praxis it works very well.

What else could opcode 0926: check instead

test the script below

press Yes key to start the external, press No key to end it.

 

DEFINE OBJECTS 1DEFINE OBJECT (unused dummyobject)      DEFINE MISSIONS 0DEFINE EXTERNAL_SCRIPTS 1DEFINE SCRIPT TestExternscript AT @TEXS // 0DEFINE UNKNOWN_EMPTY_SEGMENT 0DEFINE UNKNOWN_THREADS_MEMORY 0{$VERSION 3.1.0027}//-------------MAIN---------------thread 'MAIN' fade 0 0 042C: set_total_missions_to 0 030D: set_max_progress 0 01F0: set_max_wanted_level_to 6 set_wb_check_to 0 00C0: set_current_time_hours_to 23 minutes_to 0 04E4: unknown_refresh_game_renderer_at 2494.5 -1668.5 Camera.SetAtPos(2494.5, -1668.5, 13.4)$PLAYER_CHAR = Player.Create(#NULL, 2494.5, -1668.5, 13.4)07AF: $PLAYER_GROUP = player $PLAYER_CHAR group $PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)Actor.Angle($PLAYER_ACTOR) = 180.0Camera.SetBehindPlayerPlayer.SetClothes($PLAYER_CHAR, "BBALLJACKRSTAR", "BBJACK", Torso)Player.SetClothes($PLAYER_CHAR, "JEANSDENIM", "JEANS", Legs)Player.SetClothes($PLAYER_CHAR, "SNEAKERBINCBLK", "SNEAKER", Shoes)Player.SetClothes($PLAYER_CHAR, "PLAYER_FACE", "HEAD", Head)Player.Build($PLAYER_CHAR)0629: change_integer_stat 181 to 4 set_weather 1 select_interior 0 Player.CanMove($PLAYER_CHAR) = True01B7: release_weather 016C: restart_if_wasted_at 2494.5 -1668.5 13.4 angle 180.0 town_number 0 016D: restart_if_busted_at 2494.5 -1668.5 13.4 angle 180.0 town_number 0 fade 1 1000 wait 100 03E6: remove_text_box 0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here create_thread @EXSS :MAIN_336wait 2500 jump @MAIN_336 :EXSS///-----------Extern script starter thread for test extern scriptthread 'EXSS' :EXSS_11wait 0 if   Player.Defined($PLAYER_CHAR)jf @EXSS_11 0926: [email protected] = external_script_status 0 (TestExternscript) 03F0: enable_text_draw 1 045A: draw_text_1number 100.0 100.0 GXT 'NUMBER' number [email protected]  // ~1~if 00E1:   player 0 pressed_key 11// Yes key jf @EXSS_11 if  [email protected] == 0 jf @EXSS_11 08A9: load_external_script 0 (TestExternscript) if 08AB:   external_script 0 (TestExternscript) loaded jf @EXSS_11 0913: run_external_script 0 (TestExternscript)  jump @EXSS_11 //-------------External script 0 (TestExternscript)---------------:TEXS09BD: Extern_Script_Status_flag 1 thread "TEXS" 03E5: show_text_box 'FEM_ON'  // ONwait 1000 :TEXS_28wait 0 if 00E1:   player 0 pressed_key 10// No key jf @TEXS_28 03E5: show_text_box 'FEM_OFF'  // OFF09BD: Extern_Script_Status_flag 0 end_thread 

 

Edited by ZAZ

Share this post


Link to post
Share on other sites
Deji

I'm pretty sure 0926 simply returns whether the script is running or not. This is not controlled by another opcode... But that's based on my own knowledge from reading the main.scm. I've never tested it myself.

 

 

090 push    1    ; no. of parameters094 mov     ecx, esi    ; move to the function call094 call    CScriptThread__getNumberParams090 xor     ecx, ecx090 mov     cx, word ptr _opcodeParameters    ; get the params090 push    ecx            ; scmIndex094 mov     ecx, offset _externalScripts    ; move the pointer to the external scripts data094 call    _CExternalScripts__findByScmIndex    ; get the script by the ID090 movsx   eax, ax090 shl     eax, 5090 movzx   edx, _externalScripts.scripts.status[eax]    ; return the script status090 jmp     loc_477BDF

 

 

I know it's hard to understand and I only just get it.

 

09BD sets 2 single static memory addresses in particular (0xA444A7 and 0xA444A8)... This function does not read that memory address.

 

You could try writing the byte to both those addresses to see what effect that actually has on 0926.

 

 

I'm not completely sure of all this. It looks like the function sets a script flag as well, but not for external scripts.

 

I want to be sure before I bother updating it in the database.

Edited by Deji

Share this post


Link to post
Share on other sites
Bennington

I´m looking for a certain opcode, one that checks if all story missions have been passed.

Or at least one that checks the last STORY mission (not those side mission like vigilante and so on).

It would be great if someone could tell me smile.gif

 

Share this post


Link to post
Share on other sites
spaceeinstein
....if   $629 == 5then....

 

Edited by spaceeinstein

Share this post


Link to post
Share on other sites
Bennington

Another Question:

Can you use opcode 0595: mission_complete in an if-condition?

Share this post


Link to post
Share on other sites
TheSiggi
Another Question:

Can you use opcode 0595: mission_complete in an if-condition?

no

Share this post


Link to post
Share on other sites
Deji

Sigh...

 

 

077D: [email protected] = car [email protected] x_angle

 

is actually

 

077D: [email protected] = car [email protected] y_angle

 

 

and

 

 

06BE: [email protected] = car [email protected] y_angle

 

is actually

 

06BE: [email protected] = car [email protected] x_angle

 

 

?

 

I'll leave it for confirmation for now, but it caused me confusion when rolling the plane sideways caused the missiles to be created vertically...

Share this post


Link to post
Share on other sites
ZAZ

The explosion with opcodes 020C: and 0565: needs to run together

 

020C: create_explosion_with_radius <type: int var> at x y z

0565: create_temporary_explosion_fire x y z <type: int var>

 

opcode 020C: makes a black blot on the ground and make the sound

opcode 0565: makes demage

 

both opcodes displays the visually explosion effect

 

the parameter for the <type: int var> determines an explosion type

which have effect to the explosion radius as well to the demage

and the visually explosion effect

 

I recommand to set the same type value in both opcodes but it's not required

In the case that both opcodes have the same type value you will get following results

 

Explosiontype 0 = "explosion_small"

Explosiontype 1 = "explosion_molotov" - no sound, less demage, burns car

Explosiontype 2 = "explosion_small"

Explosiontype 3 = "explosion_small"

Explosiontype 4 = "explosion_fuel_car" - no sound

Explosiontype 5 = "explosion_fuel_car" - no sound

Explosiontype 6 = "explosion_large" + "explosion_fuel_car"

Explosiontype 7 = "explosion_large" + "explosion_fuel_car"

Explosiontype 8 = none visually effect

Explosiontype 9 = none visually effect

Explosiontype 10 = "explosion_large" + "explosion_fuel_car"

Explosiontype 11 = "explosion_small"

Explosiontype 12 = "explosion_tiny" less demage, burns car

 

below an Explosion_test script

 

{$CLEO .cs}:Explosion_tests03A4: name_thread 'EXPLOTS' wait 200000C0: set_current_time_hours_to 23 minutes_to 0 01B6: set_weather 10 [email protected] = 0{Explosiontype 0 = "explosion_small"Explosiontype 1 = "explosion_molotov" - no sound, less demage, burns carExplosiontype 2 = "explosion_small"Explosiontype 3 = "explosion_small"Explosiontype 4 = "explosion_fuel_car" - no soundExplosiontype 5 = "explosion_fuel_car" - no soundExplosiontype 6 = "explosion_large" + "explosion_fuel_car"Explosiontype 7 = "explosion_large" + "explosion_fuel_car"Explosiontype 8 = none visually effectExplosiontype 9 = none visually effectExplosiontype 10 = "explosion_large" + "explosion_fuel_car"Explosiontype 11 = "explosion_small"Explosiontype 12 = "explosion_tiny"  less demage, burns car}:Explo_30001: wait 0 ms if0256:   player $PLAYER_CHAR defined 004D: jump_if_false @Explo_303F0: enable_text_draw 1 045A: draw_text_1number 100.0 60.0 GXT 'NUMBER' number [email protected]  // ~1~ 00D6: if 0AB0:   key_pressed 8//-----------------------press Backspace to reset explosiontype 004D: jump_if_false @[email protected] = 0:Explo_500D6: if 0AB0:   key_pressed 48//-----------------------press zero 004D: jump_if_false @Explo_304C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset  0.0  30.0  0.0020C: create_explosion_with_radius [email protected] at [email protected] [email protected] [email protected]: create_temporary_explosion_fire [email protected] [email protected] [email protected]  [email protected]@ += [email protected] == 17jf @[email protected] = 0:Explo_70001: wait 1000 ms0002: jump @Explo_3 

 

Edited by ZAZ

Share this post


Link to post
Share on other sites
Wesser

I found out an opcode which allow peds to complete their climbing action, so if they jump and are ready to climb either a gate or a wall, they'll perform it automatically. I tested this on player only but it probably enable peds just to climb or not.

 

078F: actor -1 auto_climb 1 

 

Edited by Wesser

Share this post


Link to post
Share on other sites
coin-god
Interesting find.

Share this post


Link to post
Share on other sites
Deji

Mmm.. this is already added in the DB a while ago: 078F, as well as others you may find interesting, if you've not looked already.

Share this post


Link to post
Share on other sites
12jango

 

0939: attach_car [email protected] to_object [email protected] with_offset 0.0 0.0 -0.8 rotation 0.0 0.0 180.0 

 

 

Hey, I found out that this opcode is able to attach a car on an object.

 

Then I combined the opcode below, so the car and the player attached onto the same object.

 

 

09A0: actor $PLAYER_ACTOR attach_object [email protected] with_offset 0.0 0.0 0.0 on_bone 5 16 perform_animation "NULL" IFP_file "NULL" time -1

 

 

But still, everytime I jumped/fall from heights the car detached! I wonder if y'all know how to attached the car without having it detached!

Share this post


Link to post
Share on other sites
Silent

That was discovered ages ago, sorry.

Share this post


Link to post
Share on other sites
12jango

Well, actually I was asking about how to attach a car without having it fell down while it is in air. confused.gif

Share this post


Link to post
Share on other sites
Deji

This is a topic for documenting opcodes, not for asking questions.

Share this post


Link to post
Share on other sites
Nahiyan

 

0647: AS_actor [email protected] stop_looking

 

My first time documenting an opcode biggrin.gif

 

Rage Edit (off topic) -

 

Noooooooooo my heavily modded gta3.img became corrupt! No no no!!! cry.gif

 

1 small victory led to a huge loss T_____T

Edited by Nahiyan

Share this post


Link to post
Share on other sites
spaceeinstein

Deji, can you explain more about this? How did you figure that out?

Edited by spaceeinstein

Share this post


Link to post
Share on other sites
Deji

From the look of the car generator function, the values are actually unused in SA. The struct changes little from GTA III, though. I've never gotten deep into the GTA III .idb, so I'm not sure where to look in that.. but as for the SA function, it and I are quite acquainted after the attempt to finish documenting the structure, only to find MTA had already done so: http://code.google.com/p/mtasa-blue/source...atorSA.h?r=1614

Share this post


Link to post
Share on other sites
-ATP-

Hey,

when I create camera movements I have one problem. When I move the camera from point A to point B the movement starts not immediately, first it is slow and speeds slowly up. Is there any opcode to prohibit this?

Edited by -ATP-

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.