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. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. 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

GTA:SA Opcodes


Opius

Recommended Posts

hi.

 

I have one question to some opcode i looking for opcode who do this same operates as this:

 

0459: end_thread_named

 

 

but who work good to end the thread who be in the .cs file who be played in the begin of the script (this is this opcode):

 

0A92: create_custom_thread "gtal\NFS Race script 2.cs"

 

 

and in the end i must have the opcode who end this thread when the thread is end.

 

 

0459: end_thread_named

 

 

this opcode its not good working with cleo custom script file(.cs)

and with this opcode:

 

0A92: create_custom_thread "gtal\NFS Race script 2.cs"

 

 

please help.

i can paste script when some need this.

Link to post
Share on other sites
OrionSR

 

I'm sorry about the way I named the opcodes. Back then I didn't know that 0=off and 1=on. I've never code outside GTA before so I don't know anything about the naming formats. You can recheck/reconfirm/reedit all the opcodes that I posted.

Thanks spaceeinstein. I'm glad that this remains a dynamic process and I will continue to offer clarifications when I stumble across them. Care to offer any hints about the use of "toggle"?

 

Which reminds me, and also let's me stay on topic.

 

Clarification: toggle instead of enable

0572: toggle_taxi_nitros 1 

This bugger is apparently a toggle. When nitrous is enabled early, completing the mission toggles it back off again.

Link to post
Share on other sites

 

0605: set_actor -1 perform_animation "SWT_WLLPK_L" file "SWAT" 8.0 loop 0 lockX 0 lockY 0 lockF 0 limT -1 //versionA

 

 

The first float (typically, 4.0) appears to be the rate of speed that the animation is played. Less than 4.0 slows it down, more will speed it up. Higher numbers like 10000.0 or so tend to skip animation frames. Only bringing it up because it doesn't seem to be documented in any of the SASCM.ini's.

 

Also, if we're following the 0 is off and 1 is on motif, I think UNlockX and UNlockY would be more appropriate. Example:

 

 

0605: set_actor -1 perform_animation "CROUCH_ROLL_L" file "PED" 8.0 loop 0 lockX 1 lockY 1 lockF 0 limT -1 //versionA

 

 

With both lock x and lock y set to 1 (on?), the actor will stay at the coords he winds up rolling to. With both set to 0, the actor returns to its starting position.

 

LockF locks the actor into the last frame of the animation; can not be freed with clear_actor_task, but can be with another animation (or presumably, another opcode that has the actor doing something).

 

I have not tested versions B and C yet, but I would believe them to be the same.

Edited by ceedj
Link to post
Share on other sites
Midnightz

I could've sworn PLPynton documented this in this topic but it must've been in another thread... which is partly why I didn't post this info before.

Link to post
Share on other sites
  • 4 weeks later...
OrionSR

The clarifications below are offered in light of new information available for the Police Trigger Zones.

 

 

04F8: unknown_crossroad_type 3 if_player_with_wanted_level_in_car_in_rectangleA 2435.2 -1741.0 2454.9 -1723.4 unknown_rectangleB 2481.0 -1707.0 2480.0 -1732.0 unknown_rectangleC 2481.0 -1707.0 2480.0 -1732.0                                     04F8: define_police_trigger_type 6 if_player_with_wanted_level_in_rectangle 1846.25 -2493.75 1839.25 -2509.75 spawn_policeA_at   1780.0 -2575.0   headed_towards   1780.0 -2510.0   spawn_policeB_at   1789.0 -2479.0   headed_towards 1774.0 -2493.004F8: define_police_trigger_type 6 if_player_with_wanted_level_in_rectangle 1846.25 -2493.75 1839.25 -2509.75 spawn_policeA_along_rayA 1780.0 -2575.0 1780.0 -2510.0 spawn_policeB_along_rayB 1789.0 -2479.0 1774.0 -2493.0

 

 

Police Trigger Types

1 - On Foot with 1 star spawns 2 cop cars moving slowly 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed 4 - On Foot with 1 star spawns 1 cop pedestrian 5 - On Foot with 1 star spawns 2 cop pedestrians 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly 8 - On Foot with 1 star spawns 2 cop cars at medium speedNotes: Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel. When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point. If the police trigger type includes 2 police, then a cop will also spawn along ray B. The police are not bound to continue in the specified direction after their initial spawn. In order to trigger In Vehicle trigger types the vehicle must be moving. Police trigger zones are activated only once per 40 seconds (the first field is used to control this). Police trigger zones can be created using opcode [[04F8]]
Link to post
Share on other sites

Hi! Can someone point out the differences with these

 

00DB: is_actor $PLAYER_ACTOR in_vehicle $RYDER_CAR

 

0448: is_actor $ACTOR_RYDER inside_vehicle $RYDER_CAR

 

and these

 

00DF: is_actor $PLAYER_ACTOR driving

 

0449: is_actor $PLAYER_ACTOR inside_any_vehicle

 

as they seem to return true either way. What's the distinction? Also, 00DF returns true if a driver OR a passenger.

Link to post
Share on other sites

They are essentially the same, but the second opcodes (0448 and 0449) additionally check the current actor's task ID, and return true if this ID is equal either to 709 or 1022. I don't know what these numbers mean.

 

00DF checks if the driving flag in the actor's structure is true and the pointer to the actor's vehicle is non-zero.

0449 performs the 00DF's stuff + checks the task ID, as I said.

00DB checks the driving flag + compares the pointer to the current actor's vehicle with than given as the second parameter.

0448 does 00DB + task ID comparison.

 

 

Link to post
Share on other sites
  • 4 weeks later...

 

09C1: add_next_text_to_brief_history 0

 

this makes the game put the text on the brief history list or not. If set to 0, the text shown with any opcode (00BB, 03E5, etc) will not be visible on the brief menu screen. After each those opcodes, the flag is set to 1.

 

 

09C2: cancel_rampage

 

this cancels the rampage, and the rampage status (01FA) is set to 3 (failed). Used on PS2 version, in 2 players mode to stop the rampage (when both players are dead or their vehicle is destroyed).

 

Link to post
Share on other sites
  • 1 month later...

Ok, a couple more questions...

 

1) What's the difference with these three?

 

 

0605=9,set_actor %1d% perform_animation %2h% file %3h% %4d% loop %5h% lockX %6h% lockY %7h% lockF %8h% limT %9h%;versionA0812=9,set_actor %1d% perform_animation %2h% file %3h% %4d% loop %5h% lockX %6h% lockY %7h% lockF %8h% limT %9h%;versionB0A1A=9,set_actor %1d% perform_animation %2h% file %3h% %4d% loop %5h% lockX %6h% lockY %7h% lockF %8h% limT %9h%;versionC

 

 

2) How do these work?

 

 

07DE=1,  is_modelID %1d% valid_modelID_to_load 0488=1,  model %1d% exists;***

 

 

I mean, I can figure out what they do, but are they checking the map files or the img? The first one seems to work (returns false) if I have models in the img, but not in the IDE file.

 

Did I just answer my own question? notify.gif How about the second one then?

 

EDIT: Ooo another one:

 

 

0614=3,set_actor %1d% animation %2h% progress_to %3d% 

 

 

All the examples I've found either use 0.0, 1.0 or something in between. Take this piece of code:

 

 

:GYMLS_14890001: wait 0 ms 0050: gosub @GYMLS_6164 00D6: if 0039:   [email protected] == 0 // L == INT 004D: jump_if_false @GYMLS_1667 00D6: if 8118:   not is_actor [email protected] dead 004D: jump_if_false @GYMLS_1589 00D6: if 0611:   is_actor [email protected] performing_animation "GYM_SHADOWBOX" 004D: jump_if_false @GYMLS_1589 0614: set_actor [email protected] animation "GYMSHADOWBOX" progress_to 0.0 :GYMLS_158900D6: if 8118:   not is_actor [email protected] dead 004D: jump_if_false @GYMLS_1660 00D6: if 0611:   is_actor [email protected] performing_animation "GYM_SHADOWBOX" 004D: jump_if_false @GYMLS_1660 0614: set_actor [email protected] animation "GYMSHADOWBOX" progress_to 0.5 

 

 

The problem here is that GYM_SHADOWBOX is never loaded or used (but it is in the ifp), while GYMSHADOWBOX IS used (no underscore), so I can't tell how this works. Way to go QA! biggrin.gif

 

Basically, I'd like to use it to jump to the middle of an animation; is 0.0 the beginning and 1.0 the end? Why the frack didn't they just use frame numbers?? The problem I'm having is that the actor always starts the animation from the beginning, unless I check it like above first, which seems silly, since I KNOW the actor will be playing the animation; just play it from where I say! o

 

Anywho, insight would be grand, yup.

Edited by ceedj
Link to post
Share on other sites
Seemann

 

1) What's the difference with these three?

 

 

0605=9,set_actor %1d% perform_animation %2h% file %3h% %4d% loop %5h% lockX %6h% lockY %7h% lockF %8h% limT %9h%;versionA0812=9,set_actor %1d% perform_animation %2h% file %3h% %4d% loop %5h% lockX %6h% lockY %7h% lockF %8h% limT %9h%;versionB0A1A=9,set_actor %1d% perform_animation %2h% file %3h% %4d% loop %5h% lockX %6h% lockY %7h% lockF %8h% limT %9h%;versionC

 

 

0605, 0812, 0A1A and 088A are absolutely same.

Link to post
Share on other sites
  • 2 weeks later...
P.I.M.P_PL

 

02B9: deactivate_garage 'custom_name'

 

deactivate garage with our name in ' '

 

0299: activate_garage 'custom_name'

 

activate garage with our name in ' '

 

 

03B0:   garage 'custom_name' door_open

 

open garage doors with our name in ' '

 

 

0926: $SCRIPT_STATUS = external_script_status our_number (our_name) 

 

in this opcode $SCRIPT_STATUS = our external script with our number and our name

 

 

08A9: load_external_script  our_number (our_name) 

 

loading external script with our_number and our_name

 

 

08AB:   external_script our_number (our_name) loaded 

 

checking if external script with our_number and our_name loaded

 

0913: run_external_script  our_number (our_name)

 

run external script with our_number and our_name

 

 

090F: end_external_script  our_number (our_name)

 

end external script with our_number and our_name

Edited by P.I.M.P_PL
Link to post
Share on other sites
  • 5 weeks later...

Hey!

 

In Vice City opcode 04D2 mades a plane fly towards a certain point and then fly around it... In San Andreas this opcode makes a plane fly around this point without flying through it...

Is there another way (or opcode) to make a plane fly towards a certain point?

 

Thanks... Aschratt!

Link to post
Share on other sites
  • 1 month later...
ATHMystikal

Hi,

 

Anybody know the opcode which makes an actror who is in a car/bike follow another actor?dozingoff.gif

 

I mean:

 

(actor1 in car/bike) follow actor2.

or

(car/bike) follow actor2.

 

actor2 may be in car or on foot. but actor1 should follow him without getting out of car/bike. Does an opcode like this exist? confused.gif

Thankz:)

Link to post
Share on other sites

how i understand , here you post qestions about missions ( how to made them) i saw on the internet a mod thats give you a bigfoot mission to SA

this is here what i need or its a nother topic because i dont found a topic about request mods for a missions!!

Link to post
Share on other sites
  • 1 month later...

Im wondering, im just new to SCM and all (started out today) and tryd to make some simple things to work. i did notice some thing.

 

0222 (set_player_health) and 035E (set_player_armor) doesnt seem to work for me in a looped thread (infact it doesnt work at all, because i dont even get a armor bar)

 

Im sure i did it right because i did:

 

create_thread @test

 

...

...

 

:test

wait 5 ms

0222: set_player_health 100

035E: set_player_armor 100

jump @test

end_thread

 

Im using sanny builder 3.03.. However, when i use 0223 (set_actor_health $PLAYER_ACTOR health_to 100)(thanks Patrick_W for sorting that one out btw) it does work. But then yet again, theres no opcore for armor for the actors. Does anyone experianced such problems with 0222 and 035E too? Just checking out..

 

Greets

Edited by jos116
Link to post
Share on other sites

 

try it with colons next to 0222: 035E:

Done that, just forgotted to type it tounge.gif . Sorry bout that blush.gif

 

Edit:Just found out those where only for VC. Damn, SA-DB is inacurate..

Edited by jos116
Link to post
Share on other sites

@ATHMyst. Did you try using 0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR ? Thats the only 'suitable' one i can find. The other ones are heli -> actor or car -> car. I dont know what the as_ stands for tho, could be a check, not sure.

 

Sorry it that aint the one your searching for, im only new to it since yesterday, so yeah..

Link to post
Share on other sites
  • 2 weeks later...

Just thought I'd update one;-

 

01f9=9,init_rampage_name %1g% with_weapon %2d% time %3d% targets %4d% target1ID %5d% target2ID %6d% target3ID %7d% target4ID %8d% show_passed_text %9d%

 

P1 is GXT entry of name to be displayed when rampage starts

P2 is weapon ID to be used

P3 is time allowed for rampage

P4 is number of targets required to pass rampage

P5 - P8 are the model IDs of targets (from peds.ide and vehicles.ide). Use -1 for 'any ped' and -2 for 'any vehicle'.

P9 if set to 1 will display the GXT entry named 'KILLPA' from the MAIN table when the rampage is passed (usually left at 0 and the script shows its own text).

Link to post
Share on other sites
  • 1 month later...

Clarifications:

 

 

;07F7=2,set_object %1d% indestructible %2h%07F7=2,set_object %1d% destructible %2h%

 

In context:

//OSR/CG23: Allow Smash Wall to Break Early //requires SWAT van, enable floor with CARTER objects071F: set_object $2721 health_to 10007F7: set_object $2721 destructible = True

 

 

 

;0572=1,enable_taxi_nitros %1h%0572=1,toggle_taxi_nitros %1h% 

This is the only true toggle I have come across. If enabled early, completing the Taxi mission will toggle off the taxi nitros.

 

 

;076A=2,set_zone %1g% pedgroup_wealth_to %2h%;076B=2,get_zone %1d% pedgroup_wealth_to %2d%076A=2,set_zone %1g% dealer_density_to %2h%076B=2,get_zone %1d% dealer_density_to %2d% 

I have not tested if get_zone code reads the drug dealer density.

 

 

;07A8=1,enable_area69_sam %1h%;09E4=1,enable_aircraftcarrier_sam %1h%07A8=1,disable_area69_sam %1h%09E4=1,disable_aircraftcarrier_sam %1h% 

Area69 SAMs are enabled by default. The aircraft carrier SAMs are disabled by default. Settings are not saved.

 

 

;09E9=1,car %1d% add_single_nitro09E9=1,car %1d% set_single_nitro

The vehicle will have a count of 1 nitro after using this command, no matter how many were installed before.

 

 

;0814=16,define_unique_jump_start %1d% %2d% %3d% radius %4d% %5d% %6d% land %7d% %8d% %9d% radius %10d% %11d% %12d% camera %13d% %14d% %15d% reward %16d%0814=16,define_unique_jump_start %1d% %2d% %3d% radius %4d% %5d% %6d% in_air_goal %7d% %8d% %9d% radius %10d% %11d% %12d% camera %13d% %14d% %15d% reward %16d% 

Placing objects in the corners of each zone makes it very clear that landing within the 2nd area is not required. Passing though the second zone while still in the air will score the bonus no matter where the vehicle lands.

 

 

Link to post
Share on other sites
  • 1 month later...
Jabhacksoul

I been messing with:

 

 

05D1=9,AS_actor %1d% drive_car %2d% to %3d% %4d% %5d% speed %6d% %7h% model %8o% %9h% 

 

 

Those last 3 unknowns have many people stumped but I know this much:

 

%7h% is a value 0 to 3 AI behavior? 0 - Obey lights, stay in your lane, never pass (goody two shoes)1 - Obey lights but will pass traffic2 - Straight path A to B, drive through parked cars, empty lots, and buildings3 - Run lights, avoid cars and traffic, buildings, hits peds, who cares(maniac) %8o% will reference how the car should handle through the HANDLING.CFG file but if set to #NULL it sets the car to automatic. (I am not 100%, I am still experimenting.)%9h% is some type of drivers skill. The MAIN.SCM uses number 0 to 5 for this value in various missions. I have noticed setting the value higher seems to make the driver/car brake better on high speed turns and skids.

 

 

Someone please correct me if I am wrong.

 

JAB B)

Link to post
Share on other sites

 

05D1: AS_actor [email protected] drive_car [email protected] to -2738.9983 2360.7092 72.03 speed 15.0 0 0 8 

 

 

Im using it like this for a mission im making for my TC mod. Its the first time i got the desired effect.

 

He drives the car like a normal guy, but he hits cars in the way and hit peds too. I dont know if he ignores traffic lights (but i think he might).

Link to post
Share on other sites
  • 2 weeks later...

 

Code

0788: enable_heli $MAGNET_HELI magnet  1;; Turn it on

 

 

devil.gif  devil.gif

Guess what? GUESS WHAT!? It's already discovered! WOW!

 

If these are codes that you've read from somewhere... Then it doesn't need to be posted here. Check the latest sascm.ini or the sa-opcodes database before posting. And use the search function down there \/

 

devil.gif

 

Anyway... I've been trying to crack some command but it crashes the game everytime I try >.< Maybe it's CLEO incompatible or maybe I didn't code it right. Too bad I forgot what the opcode is anyway... Gave up yesterday turn.gif

Link to post
Share on other sites
spaceeinstein

Back in the old days of finding out what does the opcodes do, we used a stripped SCM and trial and error each opcode that looks like it should do something, at least that's what I did.

Link to post
Share on other sites
Michael_Sund
This is little off-topic, but how can you run San Andreas in a window, Craig Kostelecky?

Check out GTAGarage. There's a window mode/coordinates mod made by Smithers (along with many other mods)

Just do CTRL+ENTER

Link to post
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.