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. Los Santos Summer Special
      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. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA 6

      1. St Andrews Cathedral
    3. GTA V

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

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

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

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

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

      1. Guides & Strategies
      2. Help & Support
    11. 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. DYOM
      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

Seemann

 

Does that opcode automatically transport you to a hospital too?

 

 

No, it's doing with scripts:

 

 

:CASINO6_3203603CB: set_rendering_origin_at 1578.446 1770.682 9.828 04E4: unknown_refresh_game_renderer_at 1578.446 1770.682 0972: put_actor $PLAYER_ACTOR at 1578.446 1770.682 9.828 // versionC 0173: set_actor $PLAYER_ACTOR Z_angle_to 99.7567 0974: unknown_emulate_wasted // +12 hours and clear weapons 0006: [email protected] = 0 

 

 

Share this post


Link to post
Share on other sites
Freakingfreak

 

[08EA=1,unknown_toggle_gang_traffic %1h%I

 

t looks like a toggle of the gang car traffic or something related with gang generation. Please, confirm it.

 

actually is :

 

 08EA=1,unknown_toggle_gangs_spawn %1h% 

 

setting it to 0 ,no gangs spawn in the streets,but the gag colors and territories still appear on map .

set to 1 ,gangs spawn in streets as usual.

 

good job Seemann ,keep up the good work icon14.gifcookie.gif

would Sanny's SASCM.INI will work with mb ?

Edited by Freakingfreak

Share this post


Link to post
Share on other sites
Seemann

 

would Sanny's SASCM.INI will work with mb ?

It would, although in some opcodes MB's and Sanny's one have different parameters order. You surely could update your INI, but old scripts written in MB might be not working with sanny's SASCM.INI.

 

 

New opcodes:

 

 

08F5: save_player_group08F6: restore_player_group

 

 

They are used in some missions to prevent a disappering of the group members while CJ is inside interiour or garage (for example, in mission "Cesar Vialpando" while in lowrider garage).

 

 

Could someone to confirm this:

 

 

099E: unknown_toggle_police_cars_traffic 0

 

 

I'm not sure of it.

Edited by Seemann

Share this post


Link to post
Share on other sites
Seemann

The whole block of opcodes dealing with "AS_origin" (my variant of naming this):

 

 

061D: create_AS_origin_at 950.9462 2114.972 1011.5 Z_angle 180.0 unknown 15.0 AS_pack [email protected] handle_as [email protected]

 

creates virtual point (XYZ coords and actor's angle) and assign to it an AS_pack (action_sequences defined with 0615, 0616).

 

 

074C: AS_actor -1 goto_AS_origin [email protected]

 

makes the actor goto to this point and stand by the specified angle.

 

 

0642:   actor [email protected] at_AS_origin [email protected]

 

check if actor is at AS_origin's place

 

 

061E: remove_references_to_AS_origin [email protected]

 

removeref to this

 

 

0621: create_actor_pedtype 5 model #VWFYWA2 at_AS_origin [email protected] task 1466 handle_as [email protected]

 

create an actor at AS_origin place (very handy as it allowed to set the position and angle simultaneously. Also makes him to do some task.

 

 

0680: unknown_assign_AS_origin [email protected] to_actors_pedtype 24

 

not sure what it is for.

 

Share this post


Link to post
Share on other sites
Seemann

Sh*t, could someone explain to me, WHY THIS opcode had incorrect parameters number FOR YEARS??? That's unbelievable...

 

Nevermind, now that's fixed, 00E2 has THREE parameters!

 

I repeat: 00E2 has THREE parameters

 

00e2=3,get_player %1d% key %2d% state_to %3d%

 

 

 

00E2: get_player 0 key 4 state_to $keystate // 0 - unpressed; 255-pressed

 

 

The first and the second parameters are same as for 00E1, the last one is a variable where the key state will be stored. The possible values: 0 - if key is unpressed, 255 - pressed.

 

 

I still can't believe...

 

EDIT:

It also makes difference between keys that have same number (for example for Left-Right buttons which both have ID= 0).

So,

 

 

00E2: get_player 0 key 0 state_to $keystate

 

returns -128 if pressed Left and 128 if pressed Right.

 

Would be very useful in some cases.

Edited by Seemann

Share this post


Link to post
Share on other sites
Freakingfreak

 

Could someone to confirm this:

 

099E: unknown_toggle_police_cars_traffic 0

 

 

should be :

 

099E: unknown_toggle_police_patrols 0

 

 

setting it to 0 and cops will not patrol the streets,by foot or in cars/bikes ,u can have 1 wanted star and still,no cops,however on the 2nd wanted star police cars and cops on foot start to chase you down .

Edited by Freakingfreak

Share this post


Link to post
Share on other sites
Seemann

Freakingfreak; could you also test these opcodes?

 

06D0, 0923

 

They do something with a traffic too, but I'm not sure what exactly.

 

Share this post


Link to post
Share on other sites
Freakingfreak

 

 06D0: unknown_toggle_ambulances_firetrucks 0 

 

 

setting to 0 ,no ambulances&firetrucks

1 = as usual ,firetrucks come to extinguish fires ,ambulances show up when peds where shot .

 

 

 0923: unknown_toggle_air_traffic 0 

 

 

im not completley sure about this 1 ,need to check some more,i'll edit this it if i proved wrong.

it does not include the police and tv choppers that following you when you are wanted.

 

 

 

Share this post


Link to post
Share on other sites
Seemann

The fresh ones:

 

0A46: toggle_external_scripts_triggers_type 1 enabled 1

 

 

This opcode allows to enable/disable all script triggers.

 

The first parameter means the trigger type:

0 for actors (opcode 0928)

1 for objects (opcode 0929)

 

Was used once in the mission "Breaking the Bank at Caligula's" to disable poker, roulette and all gambling triggers while CJ is inside the casino.

 

 

0951: disable_trip_skip

 

disables the current active tripskip

 

 

0A2B:   widescreen_option_enabled

 

returns true if Widescreen enabled in Options-Display-Advanced

 

 

09FD: get_gxt_string 'XSELECT' width_to [email protected] 

 

get output string width, integer.

 

 

09FF: set_restart_closest_to $x $y $z

 

after wasted/busted player will be put at the restart point (016C, 016D) closest to this one

 

 

08D1: store_cutscene_pos_to [email protected] [email protected] [email protected]

 

gets the cutscene pos set by 0244.

Edited by Seemann

Share this post


Link to post
Share on other sites
davisp

Hello! It would be great if somebody could help me! I tried to use this opcode: 0677=4,AS_actor %1h% chat_with_actor %2d% %3h% %4h% but it didn't work. for %1h% i used $PLAYER_ACTOR for %2d% @3 (an actor I spawned before) and for %3h% and %4% i am not sure. it should be 1 or 0! I tried everything thats possible(1 and 0; 1 and 1; 0 and 1; 0 and 0) but nobody talked! I just want this talking animation! Like the PEDS do sometimes on the streets. Please help me

Share this post


Link to post
Share on other sites
Y_Less

Well IIRC one of those parameters is time in ms for the animation, so you're trying to talk for 0 or 1ms, that's a thousandth of a second maximum. I can't remember what the other one is but why did you assume they were both boolean. As with anything, mimic original code.

Share this post


Link to post
Share on other sites
davisp

in the database i read for both "int(0/1)" it must be 0 or 1! but the code doesn't work

Share this post


Link to post
Share on other sites
Seemann

davisp; the third parameter of 0677 is a lead_speaker flag which sets who will talk first. You have to use 0677 twice for every actor to make them chatting.

 

 

0677: AS_actor $actor1 chat_with_actor $actor2 lead_speaker_flag 0 unknown_flag 1 0677: AS_actor $actor2 chat_with_actor $actor1 lead_speaker_flag 1 unknown_flag 1

 

 

Newest ones:

 

06BF=3,set_searchlight %1d% follow_car %2d% speed %3d%06C0=2,  searchlight %1d% spotted_car %2d%

 

 

Same as 06B6, 06B7 but for a car.

 

 

Two very specific opcodes, used only in the card games wink.gif

 

 

059D: shuffle_card_decks 1

 

 

The game has 6 virtual arrays for the cards decks, each of them keeps 52 values meaning a card ranking and suit. This opcode randomizes the cards order.

The parameter means a number of the cards decks to shuffle. Possible values: 1-6.

 

 

059E: get_card_to $cardID

 

Stores the upper card ID to the variable. Possible returned values:

01-13 for the clubs (from the ace to the king),

14-26 for the diamonds,

27-39 for the spades,

40-52 for the hearts.

Edited by Seemann

Share this post


Link to post
Share on other sites
Seemann

 

0078=2,%1d% += unknown_float * %2d%  ; (float)0079=2,%1d% += unknown_float * %2d%  ; (float)007a=2,%1d% += unknown_float * %2d%  ; (float) 007b=2,%1d% += unknown_float * %2d%  ; (float) 007c=2,%1d% += unknown_float * %2d%  ; (float) 007d=2,%1d% += unknown_float * %2d%  ; (float) 007E=2,%1d% -= unknown_float * %2d%  ; (float)007f=2,%1d% -= unknown_float * %2d%  ; (float) 0080=2,%1d% -= unknown_float * %2d%  ; (float)0081=2,%1d% -= unknown_float * %2d%  ; (float) 0082=2,%1d% -= unknown_float * %2d%  ; (float)0083=2,%1d% -= unknown_float * %2d%  ; (float) 

 

 

That's what these ones do: the second parameter multipled by the unknown float and is added to (substracted from) the variable value. The unknown_float is a random number stored at address 0x00B7CB5C.

 

I believe, that float is the current framerate (FPS or something similar) which is changed always. R* used these opcodes to get real random values.

 

Any thoughts what could this float be else?

 

Share this post


Link to post
Share on other sites
Seemann

SASCM.INI Update

v3.1.0020

 

http://sannybuilder.com/files/SASCM.rar

 

 

The parameters order wasn’t changed, be sure your codes will be compatible with the scripts written in the the previous sanny's ini from 25/11/2005

 

Let me know if I missed something.

 

Share this post


Link to post
Share on other sites
PLPynton

accidently, by looking thru guidance law math found that in SA,

 

05A4=5,get??? %1d% %2d% %3d% %4d% store_to %5d% 

 

and i let you name it as we all know how it ends when i name them.

2D-math opcode. gives smallest angle between vector origin->%1d% %2d% and vector origin->%3d% %4d%. all floats.

Edited by PLPynton

Share this post


Link to post
Share on other sites
Seemann

 

we all know how it ends when i name them

Just don't swap the damn parameters and everything will be OK. wink.gif

 

Personally, I'm not good at the math coding (these angles, vectors, velocities ... where, I believe, you ARE better of me), so name it yourself smile.gif

 

There's similar opcodes

 

05A5:   unknown_check [email protected] [email protected] 16.0 16.0 [email protected] [email protected] [email protected] [email protected]:   unknown_calculate [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] store_to [email protected] [email protected] // IF and SET

 

which do something with angles and such. Ideas?

 

Share this post


Link to post
Share on other sites
PLPynton

05A5: is_area_center @489(@228,10f) @499(@228,10f) scale 12.0 12.0 overlaping_area_center @573(@227,10f) @583(@227,10f) scale @613 @613

found by demarest concerns more like screen.

 

i found only conditional usage of 05B0, and it seems to be that last 5th pair of 2D coords is checked if it fits to unknown relation from first 4 pairs of parameters- also 2D coords. or i can say that is a pretty damn time consuming opcode and after all it can be pooltable-only related.

 

i can suggest:

 

05A4=5,get_angle_between_vectors_origin_to %1d% %2d% and_origin_to %3d% %4d% store_to %5d% 

 

there is a special word in english for angles <180 degrees but i do not know it yet and it would be quite important to insert that word into this description.

Edited by PLPynton

Share this post


Link to post
Share on other sites
BBumper

 

0668=5,unknown_action_sequence %1d% %2d% %3d% %4d% %5d% 0668: unknown_action_sequence $ACTOR 0.0 0.0 0.0 2000 

 

 

Should be

 

 

0668=5,actor %1d% fire_at %2d% %3d% %4d% time %5d% ms 0668: actor $ACTOR fire_at 0.0 0.0 0.0 time 2000 ms

 

 

The opcode appears to tell the armed actor to fire its weapon at the x, y, z for the set amount of time.

Share this post


Link to post
Share on other sites
PLPynton

i named it before rotate to coord, are you sure that he actually opens fire? that is cool, even if i made mistake. i was looking for code like this.

 

here's my tax:

 

0574=2,set_vehicle %1d% pinned_position %2h% ex. after teleport to keep position regardless of gravity.

 

Share this post


Link to post
Share on other sites
BBumper

 

i named it before rotate to coord, are you sure that he actually opens fire? that is cool, even if i made mistake. i was looking for code like this.

 

here's my tax:

 

0574=2,set_vehicle %1d% pinned_position %2h% ex. after teleport to keep position regardless of gravity.

 

I spotted the opcode in the AMMU Nation shooting range mission so I tested it on a few models and sure enough if they're armed they fire at the coord.

 

Video for your viewing pleasure biggrin.gif

 

http://www.youtube.com/watch?v=AD79cvPRQ7c

Edited by BBumper

Share this post


Link to post
Share on other sites
PLPynton

 

099B=1,set_vehicle %1d% hold 

 

virtually engages breakes and "neutral gear", disengages after re-enter.

 

0918=2,set_vehicle %1d% enable_ignition_and_neutral_gear %2h% 

 

virtually enables or disables engine ignition and as well engages neutral gear.

 

0919=2,set_vehicle %1d% enable_parking_lights %2h% 

 

as normal lights and works only when vehicle parked (player is outside ect.)

 

Share this post


Link to post
Share on other sites
Seemann

My apologies to all. I thought I uploaded new version of SASCM.INI but it was old version 3.1.0019 from 29.01.2007 because of some devil reasons...

 

 

Now, the link http://sannybuilder.com/files/SASCM.rar leads to the real updated file from 23.02.2007. Please re-download.

 

Sorry for that.

 

Share this post


Link to post
Share on other sites
PLPynton

hi, i have already faced people asking strange questions, i was also a bit confused reading it, now i get it. do not worry, it happens.

 

here is my opcode tax:

 

0946=2,set_actor %1d% actions_uninterupted_by_incomming_weapon_fire %2h% 

 

so he can continue ex. shooting at target ignoring being under fire. in other words he dances like a duck when under fire, after setting it to 1 there is no more duck dance.

Share this post


Link to post
Share on other sites
BBumper

This is only a suggestion.

 

 

066C=10,create_FxSystem %1h% attached_to_vehicle %2d% offset %3d% %4d% %5d% rotation %6d% %7d% %8d% unknown %9h% handle_as %10d%

 

Should be.

 

 

066C=10,create_FxSystem %1h% attached_to_vehicle %2d% offset %3d% %4d% %5d% rotation %6d% %7d% %8d% times %9h% handle_as %10d%

Share this post


Link to post
Share on other sites
PLPynton

so after you set it to 3 it repeats itself 3 times right? is it anyhow related to FX keyPLAYMODE from FX definition file? like looped FX will be played 3 times in this case instead of a loop? just curiosity.

 

i mean that is the spirit, keep it up looking. and here is my tax:

 

093B=2,set_actor %1d% actions_uninterupted_by_weapon_hits %2h% 

 

so he can continue ex. shooting at target ignoring being smashed by weapons.

Edited by PLPynton

Share this post


Link to post
Share on other sites
PLPynton

dbl pst gets paid:

 

0754=0,set_animation_path_define_new 

 

use to define end of previous and beginning of a new one

 

 

0755=5,set_animation_path_add_3D_coord %1d% %2d% %3d% as_trigger_for_animation %4h% file %5h% 

 

use to add a coordinate at specified animation is executed.

 

 

0817=3,set_actor %1d% assign_to_present_animation_path_with_walk_mode %2h% route_mode %3h% 

 

engage actor with animation path. walk modes are known. route mode is basically an order of waypoints between the actor is traveling in (example: 4 waypoints, let it be A,B,C,D):

0-normal order of waypoints, once (ABCD)

1-normal order of waypoints and reverse, once (ABCDCBA)

2-normal order of waypoints plus reversed, looped (ABCDDCBAABCD...)

3-normal order of waypoints, looped (ABCDABCDABCD...)

Share this post


Link to post
Share on other sites
Beep

Good work PLPynton.

 

But these opcodes don't work for me:

 

0946=2,set_actor %1d% actions_uninterupted_by_incomming_weapon_fire %2h%

 

 

093B=2,set_actor %1d% actions_uninterupted_by_weapon_hits %2h%

 

 

I use them after I created them (They heven't got a weapon on at that moment). And it still interupts them. Maybe because I refresh they shooting every 100 ms?

Share this post


Link to post
Share on other sites
PLPynton

there is strong probability that a game object under influence of some opcodes in loop will behave extraoridinary. like vehicles under constant hydraulic enable...

how i test that is: create actor, let him be set to 0946 and 093B with parameter 1. then i take M16 and shot at him, he is like reinforced MF, i smash him and he is still like reinforced MF. now i set it both to 0, after that he dances like bunny under bullets and he flips like bunny as well when i smash him. actually the actions are not interupted (like he will continue to shot at player as his form of defence mechanism) however the animations of that actor are still showing that he is being hit by bullet (excluding these "critical hits" that are obvious to happen if you aim well and are interupting his present action/animation). relatively, however it should not interupt actions of that perticular actor after you set it to 1 for him. you remember one of the storyline misions where you are about to kill smoke? he is suppose to be a hell of an opponent not only because of amount energy he happens to have, but as well because he is being reinforced with both of these opcodes.

edit: i triple checked and it works as i described, for me. pm me your script (that part of it) at any further doubts pls.

Edited by PLPynton

Share this post


Link to post
Share on other sites
Beep

Ok thanks. I'll try to edit some things in my code. And when it still doesn't work I'll PM you. At the CLEO topic I asked about getting shooting XYZ. And you say check if he's shooting and check his position. But that aren't the coords the player is shooting at confused.gif .

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.