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

Main.scm qquestion


Ify24

Recommended Posts

So guys, I have a problem.

I wanted to make a thread in main.scm file.

So I putted a create_thread @NEW_FIRE where are other create_thread opcodes

about a 950 line.

 

And I wrote my script at the very bottom of main.scm.

here is the code, I think that everything is ok whit script:

 

 

:NEW_FIREthread 'NEW_FIRE'Model.Load(#COMET)Model.Load(#M4)Model.Load(#SEASPAR)Model.Load(#ARMY):NEW_FIRE_101wait 0 msif andModel.Available(#COMET)Model.Available(#M4)Model.Available(#SEASPAR)Model.Available(#ARMY)jf @NEW_FIRE_101Car.Create([email protected], #COMET, -277.5659, -2186.366, 28.7265)Car.Angle([email protected]) = 18.787017B: set_actor $PLAYER_ACTOR weapon 31 ammo_to 500Car.Create($ACTOR_CAR, #SEASPAR, -291.1282, -2237.6138, 29.4922)Actor.Create([email protected], Cop, #ARMY, -298.472, -2227.5327, 29.5872)01B2: give_actor [email protected] weapon 31 ammo 800 0430: put_actor [email protected] into_car $ACTOR_CAR passenger_seat 0Model.Destroy(#COMET)Model.Destroy(#M4)Model.Destroy(#SEASPAR)Model.Destroy(#ARMY)end_thread

 

 

And I started a new game and my game chraches....

Can somebody help me!

Link to post
Share on other sites
Michael.Knight1

Use This is Coding in Your Main.SCM

 

 

000950 create_thread @NEW_FIRE_

 

 

 

:NEW_FIREthread 'NEW_FIRE'Model.Load(#COMET)Model.Load(#M4)Model.Load(#SEASPAR)Model.Load(#ARMY):NEW_FIRE_101wait 0 msif andModel.Available(#COMET)Model.Available(#M4)Model.Available(#SEASPAR)Model.Available(#ARMY)jf @NEW_FIRE_101Car.Create([email protected], #COMET, -277.5659, -2186.366, 28.7265)Car.Angle([email protected]) = 18.787017B: set_actor $PLAYER_ACTOR weapon 31 ammo_to 500Car.Create($ACTOR_CAR, #SEASPAR, -291.1282, -2237.6138, 29.4922)Actor.Create([email protected], Cop, #ARMY, -298.472, -2227.5327, 29.5872)01B2: give_actor [email protected] weapon 31 ammo 800 0430: put_actor [email protected] into_car $ACTOR_CAR passenger_seat 0Model.Destroy(#COMET)Model.Destroy(#M4)Model.Destroy(#SEASPAR)Model.Destroy(#ARMY)end_thread

 

 

 

 

Thanks biggrin.gif

Edited by Michael.Knight1
Link to post
Share on other sites

Ahhhh, come on. Read my post... I used that opcodes and I putted the

create_thread @NEW_FIRE

where are the rest of create_thread 's

and I putted my thread at very bottom of main.scm...

 

I did that................. And When I started my game it chrashes.

Link to post
Share on other sites
Link2012

I'm not sure about it what I will say, but, there is any external script before your NEW_FIRE? If yes, try to put the NEW_FIRE at the end of some mission code or at the end of the main thread.

Link to post
Share on other sites

I don't know if this applies to all threads but maybe another thread is using the handles you're using in the "NEW_FIRE" Thread

 

Example:

 

In your created thread the car gets created on the handle "[email protected]" well maybe another thread that rockstar made is using that same handle, therefor making the game crash, Just rename it too $Mycar or something

Link to post
Share on other sites

Hey guys...

When I opened my compiled main.scm script,

there was now anymore my create_thread @NEW_FIRE where

other create_thread 's are

and at very bottom there wasn't my thread... Threre were just opcodes like this

 

0000: NOP

0000: NOP

0000: NOP

0000: NOP

0000: NOP

0000: NOP

0000: NOP.......

 

Anyone help !

Link to post
Share on other sites

Try this:

 

 

:NEW_FIREthread 'NEW_FIRE':NEW_FIRE_1Model.Load(#COMET)Model.Load(#M4)Model.Load(#SEASPAR)Model.Load(#ARMY)

 

 

All scripts in the main.scm have ":xxx" after "thread 'xxx'"

Link to post
Share on other sites

I did that... Look at my first post....

 

Anyone help ?

 

Oh yeah, and when I compiled my main.scm after modding error appeard:

 

IMG file error ..... or something like that... Is this a problem ??

 

Please help.

Link to post
Share on other sites

 

Script.img is used when GTA San Andreas is running and game must be shut down.

 

http://gtag.gtagaming.com/forums/index.php...readed&pid=3362

http://gtag.gtagaming.com/forums/index.php...ds&showfile=109

With this you can compile script.img while game is running.

So did this 'chrashed' my main.scm ??

 

Ok, I installed that sanny builder patch and now its ok for IMG file, but it is stil crashing...

 

 

here is my create_thread @NEW_FIRE:

 

 

create_thread @ODDVEH create_thread @R3 create_thread @GYM create_thread @SHOOT create_thread @BLOODR create_thread @HOTR create_thread @KICKS create_thread @PSAVE1 create_thread @FLOW create_thread @HELP create_thread @COLLS create_thread @CRANES create_thread @BUY_PRO create_thread @VALET_L create_thread @ADPLANE create_thread @TRAINSL create_thread @IMPND_L create_thread @OPENUP create_thread @TRI create_thread @NEW_FIRE create_thread_wb @NONAME_2 create_thread_wb @NONAME_3 create_thread_wb @NONAME_4 create_thread_wb @NONAME_5 create_thread_wb @NONAME_6 create_thread_wb @NONAME_7 create_thread_wb @APCHECK create_thread_wb @GFINIT create_thread_wb @NONAME_8 create_thread_wb @NONAME_9 create_thread_wb @HJ create_thread_wb @CELLFON 

 

 

and this is the code at very bottom of my main.scm:

 

 

:HOTDOGV_716jump @HOTDOGV_77 end_thread [b]thread 'NEW_FIRE' Model.Load(#NRG500):NEW_FIRE_24wait 0 if   Model.Available(#NRG500)jf @NEW_FIRE_24 $MY_CAR = Car.Create(#NRG500, 2258.521, -1261.734, 23.9718)Car.Angle($MY_CAR) = 270.4507Model.Destroy(#NRG500)end_thread [/b]

 

 

I lest hotgogv part of thread for you to see that it is at very bottom of the file.

And where it says

 

thread 'NEW_FIRE'

 

before that line i wrote:

 

:NEW_FIRE

 

but after compiling it dessapeard (why?)....

 

What's wrong ?

Please help.

 

Edited by Ify24
Link to post
Share on other sites
Someone already told you, stop putting your thread at the end of the main.txt, put it where other threads go.

Where are other threads go, mister ?

Link to post
Share on other sites
Link2012
I'm not sure about it what I will say, but, there is any external script before your NEW_FIRE? If yes, try to put the NEW_FIRE at the end of some mission code or at the end of the main thread.
Link to post
Share on other sites

Try to put it after :TRI, and the start like this

 

 

:NEW_FIREthread 'NEW_FIRE' :NEW_FIRE_1wait 0if00EC:   actor $PLAYER_ACTOR sphere 0 near_point 2258.521 -1261.734 radius 80.0 80.0jf @NEW_FIRE_1Model.Load(#NRG500):NEW_FIRE_2wait 0if Model.Available(#NRG500)jf @NEW_FIRE_2$MY_CAR = Car.Create(#NRG500, 2258.521, -1261.734, 23.9718)Car.Angle($MY_CAR) = 270.4507Model.Destroy(#NRG500)end_thread

 

 

And you spawn the car miles away from the player, check if the player is near first.

Edited by Bad.boy!
Link to post
Share on other sites

Guys, I have a new problem now..

When I wanted to compile my main.scm, I got an error about that label entext_226 isn't found, and it was in external script.... After that I got a new error that label WOF wasn't found (in external script too).... Same main.scm and before I diddn't have problems whit it...

I deleted it and copied a new one (backup) and the same problem...

I didnt have this problem beofre... What should I do now ?

Link to post
Share on other sites

I had that problem some time ago, the problem isn't wof but there is something wrong with your script.

Script works for me btw, you can also try to build it in the 1st mission instead of the bike. Or you can use mine (try to compile)

link

Link to post
Share on other sites

The only way entext_226 could be missing is if you deleted entext_226.

 

Start again and paste your thread into a script that you haven't already broken.

 

Are you using a stripped complete + extern scripts main.txt?

Link to post
Share on other sites

@Bad.Boy, When I tryed compiled your main.scm file (I didn't edit anything, just opened the main.scm and compile) I got an error :

 

Label "ENTEX_130" not found.

 

 

I am wondering why... Does the patch for Sanny Builder (for script.img to use when gme is running) have a bug ?

 

Please Help.

Link to post
Share on other sites
Michael.Knight1

You have not left only one solution is to put The Script To Cleo.cs

 

{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------thread 'NEW_FIRE'Model.Load(#COMET)Model.Load(#M4)Model.Load(#SEASPAR)Model.Load(#ARMY):NEW_FIRE_101wait 0 msif andModel.Available(#COMET)Model.Available(#M4)Model.Available(#SEASPAR)Model.Available(#ARMY)jf @NEW_FIRE_101Car.Create([email protected], #COMET, -277.5659, -2186.366, 28.7265)Car.Angle([email protected]) = 18.787017B: set_actor $PLAYER_ACTOR weapon 31 ammo_to 500Car.Create($ACTOR_CAR, #SEASPAR, -291.1282, -2237.6138, 29.4922)Actor.Create([email protected], Cop, #ARMY, -298.472, -2227.5327, 29.5872)01B2: give_actor [email protected] weapon 31 ammo 800 0430: put_actor [email protected] into_car $ACTOR_CAR passenger_seat 0Model.Destroy(#COMET)Model.Destroy(#M4)Model.Destroy(#SEASPAR)Model.Destroy(#ARMY)end_thread

 

 

 

Link to post
Share on other sites
Michael.Knight1
Use

0A93: end_custom_thread

Instead of

end_thread

in a .cs

oh , Yes I forgot

 

in Cleo.cs Use

 

0A93: end_custom_thread

 

 

Link to post
Share on other sites

@Michael.Knight1 The whole point of this topic is that he wants to put it in main.scm, and don't post something just to confirm someonelse's post

@Ify24 Why do you have to compile when the game is running?

Link to post
Share on other sites
Michael.Knight1
@Michael.Knight1 The whole point of this topic is that he wants to put it in main.scm, and don't post something just to confirm someonelse's post

@Ify24 Why do you have to compile when the game is running?

Man in I Put in My Man.Scm I do not see any problem ??

Link to post
Share on other sites

@Michael.Knight1 Learn english. My english is bad, but nobody can't undesrstand you, man...

 

I removed the patch for Sanny Builder and I don't compile a main.scm with game running and I still get an error about that labels aren't found... Or Sanny Builder is reading and translating something wrong and then thinks that there is a problem and show the problem, but acctually there isn't a problem........

 

I will try to re-install Sanny Builder

Link to post
Share on other sites
fastman92
@Bad.Boy, When I tryed compiled your main.scm file (I didn't edit anything, just opened the main.scm and compile) I got an error :

 

Label "ENTEX_130" not found.

 

 

I am wondering why... Does the patch for Sanny Builder (for script.img to use when gme is running) have a bug ?

 

Please Help.

Soewhere there is reference to ENTEX_130 which doesn`t exist.

Search for @ENTEX_130

Link to post
Share on other sites

Guys, I got it !!! My original backup wasn't so original...

And Bad.Boy's main.scm file wasn't compiling good for me too...

 

So I downloaded another main.scm file and there wasn't an error message...

 

Yey, my main.scm is healthy and ready for modding biggrin.gif

 

Thanks everybody for help.

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.