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. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    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

Please be aware that this is not a tutorial request forum! Use the appropriate topic for the effect.
San andreas master

Editing main.scm code

Recommended Posts

San andreas master

S.A.M Screenshot tutorial

 

Hey,

this is a thread for noob scripters in SA. If you are experiencing difficulty adding someone else's mission code into your main.scm follow this simple tutorial.

(NOTE THIS IS FOR MOST CODES NOT ALL) But i can update via request.

 

 

Step 1. You will need to be prepared and have bartons mission builder as well as the code/source

  • Step 2. Open your main.scm using bartons mission builder
Step 3. Here is where youll need to post your create thread (eg.004F: create_thread ��mymod)

user posted image

  • Step 4. This is where i recommend you put the actual code, its right near the top and easy to find

     

    user posted image

Step 5. Click run then compile:)

user posted image

colgate.gif

Step 6. close bartons mission builder and go into its folder, then copy the main scm file that is in it into the date/script folder

 

  • FIXES

 

If you encounter the error:

user posted image

You will need to edit the define memory (at the top of the main.scm file) to what it says in the information box that will come up so from the above to pic to this:

user posted image

 

If you entounter something that says "label not found" or something like that then do this:

 

 

I received this error when compiling the mod scm: "Label not found: LABEL019B18"

 

I then searched for this string in the code and found this:

 

 

:BBALL_58600D6: if 2109CC: object @0 model_is #BSKBALL_LAX09CC: object @0 model_is #VGSXREFBBALLNET004D: jump_if_false £BBALL_60600D6: if 00038: $1921 == 0;; integer values004D: jump_if_false £BBALL_60600D6: if 00038: $1016 == 0;; integer values004D: jump_if_false £BBALL_60200D6: if 000E1: key_pressed 0 19004D: jump_if_false £BBALL_6010004: $1016 = 1;; integer values004F: create_thread ££Label019B18 @0 <-here's our string

 

 

 

I then searched the original scm for ":BBALL_586" and found this:

 

 

:BBALL_58600D6: if 2109CC: object @0 model_is #BSKBALL_LAX09CC: object @0 model_is #VGSXREFBBALLNET004D: jump_if_false £BBALL_60600D6: if 00038: $1921 == 0;; integer values004D: jump_if_false £BBALL_60600D6: if 00038: $1016 == 0;; integer values004D: jump_if_false £BBALL_60200D6: if 000E1: key_pressed 0 19004D: jump_if_false £BBALL_6010004: $1016 = 1;; integer values004F: create_thread ££BBCHAL_1 @0 <---THIS LINE IS DIFFERENT

 

 

so I then replaced "Label019B18" with "BBCHAL_1" in the mod scm

(you'll want to use the find&replace method while starting at the very top)

 

Tried to recompile and received this error: "Label not found: BBCHAL_1"

 

I then referenced the original code to find out what BBCHAL_1 is and where, and found this:

 

 

:PROJECT_237004E: end_thread:BBCHAL_103A4: name_thread 'BBCHAL'0006: @19 = 0;; integer values

 

 

 

 

So I then searched the mod scm for ":Project_237" and found something interesting:

QUOTE

 

 

:PROJECT_237004E: end_thread03A4: name_thread 'BBCHAL'0006: @19 = 0;; integer values

 

 

IT'S A BUG!! AAHHHH!!

 

I then changed it to match the original:

 

 

 

:PROJECT_237004E: end_thread:BBCHAL_1 <-- the builder forgot this line03A4: name_thread 'BBCHAL'

 

 

 

This fix contributed by "Bigun".

 

 

 

After compiling again I then received this error: "Label not found: LABEL0193A4"

 

It's a DIFFERENT label... Noticing a trend here..

 

After doing the same thing for this I only noticed a couple that were 'bugged' like the "BBCHAL_1", the rest just needed the label0... replaced with whatever the original scm has.

 

ask if you want any other screenies or need any help or queries feel free to ask

Regards S.A.M

Edited by Gangsta Killa

Share this post


Link to post
Share on other sites
brotherbozar

Sweet tutoral.

 

Many people ask how to do this, I've asked several times with no luck so Thanks San Andreas Master!

Share this post


Link to post
Share on other sites
San andreas master

thats alright mate, let me know if you experience any further difficulty biggrin.gif

Share this post


Link to post
Share on other sites
justa_newbie

Sweet! Just what I was wondering. smile.gif

 

Thanks for posting this, San andreas master.

 

 

 

justa_newbie

Share this post


Link to post
Share on other sites
Kill3r

This is my problem. Sometimes I get these errors like not enough defined memory or something to that effect or Label so and so not found. This is what I need help with. cry.gif

Share this post


Link to post
Share on other sites
San andreas master

if this occur replace the scm your editing with a backup then it should work:)

Share this post


Link to post
Share on other sites
Bigun
This is my problem. Sometimes I get these errors like not enough defined memory or something to that effect or Label so and so not found. This is what I need help with. cry.gif

Both are pretty easy to fix, no need to revert to a backup. On the not enough defined memory one, MB tells you in the error box what you should set the memory to. Then, go to the very top of the file and change

 

DEFINE MEMORY 0000

 

According to the number it tells you, so if it tells you 4409 you simply put...

 

DEFINE MEMORY 4409

 

 

On the label not found, it tells you WHAT label isn't found. CTRL+F that label, if it tells you:

'Label Xoo not found'

CTRL+F:

 

£Xoo

 

Now it will bring you to the code which jumps, or does anything with that 'label'. Most of the time it will be a typo, like

(freestyle)

 

:LabelAwait 100 msif 0 key pressed 0 Xjump_if_false ££LabelArequest_model #NRG500:LabelBif 0model #NRG500 availablejump_if_false ££LabelBcreate_car #NRG500 at X Y Z angle Xjump ££Label     <-- This should be ££LabelA

 

Now just correct the label to what you think it should be and yer pretty much done..

Share this post


Link to post
Share on other sites
San andreas master

updated, i added a new segment for fixes biggrin.gif

Share this post


Link to post
Share on other sites
brotherbozar

About the 'Label not found...' error when trying to compile an scm.

Thanks to the person who posted this, i can't remember their name but this is copied and pasted from their thread:

 

QUOTE:

 

It requires de-bugging the code. I am not fluent in the programming language used in the scripts, but I was able to figure it out, so it shouldn't be too difficult

 

First off, I got the ££LABEL0... error like everyone else was getting, but I wasn't satisfied with giving up. I figured the most logical thing would be to compare the code with that of the original main.scm that comes with the game. When compairing I noticed something:

 

When the script was decompiled it replaced some of the variables with generic ones (i.e. ££LABEL012345.. instead of ££BBCHAL_1 or whatever)

 

To keep this easy i will walk you through fixing the 'opened up' mod (partially, as it is a long process, about 30 minutes or so for me)

 

I received this error when compiling the mod scm: "Label not found: LABEL019B18"

 

I then searched for this string in the code and found this:

QUOTE

 

:BBALL_586

00D6: if 21

09CC: object @0 model_is #BSKBALL_LAX

09CC: object @0 model_is #VGSXREFBBALLNET

004D: jump_if_false £BBALL_606

00D6: if 0

0038: $1921 == 0 ;; integer values

004D: jump_if_false £BBALL_606

00D6: if 0

0038: $1016 == 0 ;; integer values

004D: jump_if_false £BBALL_602

00D6: if 0

00E1: key_pressed 0 19

004D: jump_if_false £BBALL_601

0004: $1016 = 1 ;; integer values

004F: create_thread ££Label019B18 @0 <-here's our string

 

 

I then searched the original scm for ":BBALL_586" and found this:

QUOTE

 

:BBALL_586

00D6: if 21

09CC: object @0 model_is #BSKBALL_LAX

09CC: object @0 model_is #VGSXREFBBALLNET

004D: jump_if_false £BBALL_606

00D6: if 0

0038: $1921 == 0 ;; integer values

004D: jump_if_false £BBALL_606

00D6: if 0

0038: $1016 == 0 ;; integer values

004D: jump_if_false £BBALL_602

00D6: if 0

00E1: key_pressed 0 19

004D: jump_if_false £BBALL_601

0004: $1016 = 1 ;; integer values

004F: create_thread ££BBCHAL_1 @0 <---THIS LINE IS DIFFERENT

 

 

so I then replaced "Label019B18" with "BBCHAL_1" in the mod scm

(you'll want to use the find&replace method while starting at the very top)

 

Tried to recompile and received this error: "Label not found: BBCHAL_1"

 

I then referenced the original code to find out what BBCHAL_1 is and where, and found this:

 

QUOTE

 

:PROJECT_237

004E: end_thread

 

:BBCHAL_1

03A4: name_thread 'BBCHAL'

0006: @19 = 0 ;; integer values

 

 

 

So I then searched the mod scm for ":Project_237" and found something interesting:

QUOTE

 

:PROJECT_237

004E: end_thread

03A4: name_thread 'BBCHAL'

0006: @19 = 0 ;; integer values

 

 

IT'S A BUG!! AAHHHH!!

 

I then changed it to match the original:

QUOTE

 

:PROJECT_237

004E: end_thread

 

:BBCHAL_1 <-- the builder forgot this line

03A4: name_thread 'BBCHAL'

 

 

 

After compiling again I then received this error: "Label not found: LABEL0193A4"

 

It's a DIFFERENT label... Noticing a trend here..

 

After doing the same thing for this I only noticed a couple that were 'bugged' like the "BBCHAL_1", the rest just needed the label0... replaced with whatever the original scm has.

 

This may seem rather sh*tty, and I agree, but it did work for me. And it doesn't take as long as it seems. After it finally let's you compile, you then have a bug-free main.txt! Like I said, all this code is Greek to me, but I had been playing around with car spawning and wanted to add cars across the map without having to do all the missions to get there.

 

Hopefully this helped some of you, and I'm sorry it's so long..

 

UNQUOTE

...worked for me colgate.gif

Share this post


Link to post
Share on other sites
Kill3r

Thanks alot for the information on this everyone. biggrin.gif

Share this post


Link to post
Share on other sites
San andreas master

updated again, i added biguns fix for the label error biggrin.gif

Share this post


Link to post
Share on other sites
Jabooncaboon

Whenever I add high mod, it says...

 

user posted image

Share this post


Link to post
Share on other sites
Mr. Someguy
All it does is open an empty file, no text mad.gif

Share this post


Link to post
Share on other sites
ronny8525

if I wanna add the "FirstPersonCamera" mod into my main script.i donno what to do with Mission builder for add script...teach me pls

Share this post


Link to post
Share on other sites
Vonsid

My problem is that I place the memory that that says to me it places, and equal the game is crashed to me… That I do? Sorry for my bad english...

 

I put very very mods!!

Share this post


Link to post
Share on other sites
Vonsid

My problem is that I place the memory that that says to me it places, and equal the game is crashed to me… That I do? Sorry for my bad english...

 

I put very very mods!!

 

DEFINE MEMORY 44473 i put this memory!!

Share this post


Link to post
Share on other sites
botatoboom

THANKS BRO FOR THIS TUTORIAL , ILL NEVER FORGET THAT . THANK YOU VERY MUCH

Share this post


Link to post
Share on other sites
cheeseballbob

is there like a list for all the different codes for like...the buttons u press?...like next weapon...etc...yea...is there a code for all those?

Share this post


Link to post
Share on other sites
blazevski

I made a code:

 

004F: create_thread ŁŁINITIAL_2:INITIAL_203A4: name_thread "myfirst":INITIAL_30001: wait 250 ms00D6: if  000FF:   actor $PLAYER_ACTOR  0 ()near_point_on_foot 2487.47 -1670.604 13.33595 radius  1.0  1.0  2.0004D: jump_if_false ŁŁINITIAL_4014C: set_parked_car_generator $infernus_savepoint cars_to_generate_to  101004E: end_thread:INITIAL_40002: jump ŁŁINITIAL_3

 

 

and I have put it there:

 

 

;-------------Mission 0---------------; Originally: Initial 1004F: create_thread ŁŁINITIAL_2:INITIAL_203A4: name_thread "myfirst":INITIAL_30001: wait 250 ms00D6: if  000FF:   actor $PLAYER_ACTOR  0 ()near_point_on_foot 2487.47 -1670.604 13.33595 radius  1.0  1.0  2.0004D: jump_if_false ŁŁINITIAL_4014C: set_parked_car_generator $infernus_savepoint cars_to_generate_to  101004E: end_thread:INITIAL_40002: jump ŁŁINITIAL_3:INITIAL_103A4: name_thread 'INITIAL' 06C8: toggle_riot  0 0004: $1515 =  0;; integer values0004: $1499 =  0;; integer values0005: $1500 =  5.0;; floating-point values0005: $1501 = -5.0;; floating-point values0005: $1502 =  8.5;; floating-point values0005: $1503 = -1.5;; floating-point values0005: $1504 = -30.0;; floating-point values...

 

 

I also made these 2:

 

02A7: $myfirsticon = create_icon_marker_and_sphere $55 at 2487.47 -1670.604 13.3359502A8: $myfirsticon = create_marker $55 at 2487.47 -1670.604 13.33595

 

 

014B: $infernus_savepoint = init_parked_car_generator #INFERNUS color 44 44  1 alarm  1 door_lock  0  0  10000 at  2495.786 -1671.794 13.33595 angle  90.0 014C: set_parked_car_generator $infernus_savepoint cars_to_generate_to  0

 

 

I put those 2 sumewhere in mission 0 aswell...

wont work

 

S.O.S.

 

help me please dontgetit.gif

Edited by blazevski

Share this post


Link to post
Share on other sites
blazevski

anyoooooooooneeee? pleeeeaseeee? nervous.gif

Share this post


Link to post
Share on other sites
coin-god

create_thread dont go there. confused.gif

Share this post


Link to post
Share on other sites
blazevski

thanks, but I fixed the problem now... i put everything except icon creation code and car spawn code abowe mission 0... but now there is another problem...

the car spawns there even if I aint on foot... when I arrived to groove street with car he infernus was already there...

 

any guesses?

Share this post


Link to post
Share on other sites
TheTrekhippy

With the Mission builder, when I click on Compile and Save or Compile and Save and Run GTA SA it says INstall GTA SA, which I have already. What do I need to do>? Thanks for that tutorial also.

Share this post


Link to post
Share on other sites
GTA SA MODER

 

biggrin.gif thank you this is working with sanny builder to so if u have problems with it try to use sany builder

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.
Note: Your post will require moderator approval before it will be visible.

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.