Jump to content

stripped scm


bosssman100

Recommended Posts

bosssman100

could some one tell me ware i add vehcals and weapons please in thise code thankyou biggrin.gif for vice city

 

DEFINE VERSION VICE 1.1

 

0002: jump ££Label000010

DEFINE MEMORY 9

 

:Label000010

0002: jump ££Label000034

DEFINE OBJECTS 1

DEFINE OBJECT GtaScripts.org's MA 2.10 \\ This is an unused object. You can put anything here.

 

:Label000034

0002: jump ££Label000048

DEFINE MISSIONS 0

 

;-------------MAIN---------------

 

 

:Label000048

03A4: name_thread "MAIN"

0111: set_wasted_busted_check_to 1 (enabled)

0180: set_on_mission_flag_to $PLAYER_CHAR

0053: $PLAYER_ACTOR = create_player #NULL at -37.035 -3.046 13.459

0171: set_player $PLAYER_ACTOR z_angle_to 180

016C: restart_if_wasted at 0.0 0.0 0.0 180.0

016D: restart_if_busted at 0.0 0.0 0.0 180.0

0169: set_fade_color 0 0 0

016A: fade 0 () 0 ms

0050: gosub ££Label0000DF

0373: set_camera_directly_behind_player

01B6: set_weather 1

0001: wait 500 ms

016A: fade 1 (back) 1500 ms

0050: gosub ££Label0000DF

 

 

:Label0000D3

0001: wait 1000 ms

0002: jump ££Label0000D3

 

:Label0000DF

00D6: if 0

016B: fading

004D: jump_if_false ££Label0000F7

0001: wait 0 ms

0002: jump ££Label0000DF

Edited by bosssman100
Link to comment
Share on other sites

There are some fantastic tutorials over here:

 

http://www.gtaforums.com/index.php?showforum=109

 

that explain exactly what you wish to do. Check out Y_Less's and YeTi's coding tutorials, and please, show some effort before asking someone to "do this" or else it belongs in Recruits and Requests.

 

Thanks and good luck! smile.gif

Link to comment
Share on other sites

bosssman100

ty but i no how to place weapons and vehicals in to a normol scm but cant find one about a strpped scm sad.gif

 

just wasent very sure ware to place them in that code

Link to comment
Share on other sites

This could be found by searching as well, but here ya go:

 

:Label0000D3

0001: wait 1000 ms

0002: jump ££Label0000D3

 

You can replace the lines after the label, but remember to loop back to this point, or if your code is more complex, loop back to where ever you need to in there, but this is where new code should go.

 

EDIT: You're missing a return at the end of your code, or did it get cut off in the paste?

Edited by ceedj
Link to comment
Share on other sites

bosssman100

i think im doing somthing rong because it still dosent apear

 

DEFINE VERSION VICE 1.1

 

0002: jump ££Label000010

DEFINE MEMORY 21

 

:Label000010

0002: jump ££Label000034

DEFINE OBJECTS 1

DEFINE OBJECT GtaScripts.org's MA 2.10 \\ This is an unused object. You can put anything here.

 

:Label000034

0002: jump ££Label000048

DEFINE MISSIONS 0

 

;-------------MAIN---------------

 

 

:Label000048

03A4: name_thread "MAIN"

0111: set_wasted_busted_check_to 1 (enabled)

0180: set_on_mission_flag_to $PLAYER_CHAR

0053: $PLAYER_ACTOR = create_player #NULL at -37.035 -3.046 13.459

0171: set_player $PLAYER_ACTOR z_angle_to 180

016C: restart_if_wasted at 0.0 0.0 0.0 180.0

016D: restart_if_busted at 0.0 0.0 0.0 180.0

00C0: set_current_time 9 0

0169: set_fade_color 0 0 0

016A: fade 0 () 0 ms

0050: gosub ££Label0000DF

0373: set_camera_directly_behind_player

01B6: set_weather 4

0001: wait 500 ms

016A: fade 1 (back) 1500 ms

0050: gosub ££Label0000DF

 

 

:Label0000D3

0001: wait 1000 ms

0002: jump ££Label0000D3

 

014B: $1872 = init_parked_car_generator #PATRIOT -1 -1 0 alarm 0 door_lock 0 0 10000 at -37.035 -3.046 25.459 angle 194.2

014C: set_parked_car_generator $1872 cars_to_generate_to 101

 

:Label0000DF

00D6: if 0

016B: fading

004D: jump_if_false ££Label0000F7

0001: wait 0 ms

0002: jump ££Label0000DF

 

 

:Label0000F7

0051: return

Edited by bosssman100
Link to comment
Share on other sites

Try this:

 

:Label0000D3

014B: $1872 = init_parked_car_generator #PATRIOT -1 -1 0 alarm 0 door_lock 0 0 10000 at -37.035 -3.046 25.459 angle 194.2

014C: set_parked_car_generator $1872 cars_to_generate_to 101

 

:Loop

0001: wait 1000 ms

0002: jump ££Loop

 

In this case, I added a new loop, since you (I presume) only want this code to happen once. Sorry if the previous post was unclear.

 

EDIT: If you are intent on using MB, I'd strongly suggest getting a newer version. You'd be even better suited to getting SannyBuilder and using that, since Mission Builder isn't being updated anymore.

Link to comment
Share on other sites

Knowledge Novice

Hey ceedj, hey bossman.

 

@ceedj

Well ceedj, I haven't had the opportunity to do very much coding lately so I'm kind of rusty and I'm probably just missing the obvious, but this looks like an endless loop

 

:Loop

0001: wait 1000 ms

0002: jump ££Loop

 

In this case, I added a new loop, since you (I presume) only want this code to happen once.

And if the code should only be run once, wouldn't that call for an 'end_thread'? confused.gif

 

@bossman

Another thing that you should do is to use 'personalized labels'. The game uses DMA to label objects in the game, this means that the game assigns a string of numbers to identify an object (ex. $1872 = init_parked_car_generator) you should use a more unique label (ex. $My_Patriot = init_parked_car_generator) to make sure to avoid using the same label that the game already has in use for something else, otherwise you're likely to crash your game. Later. rampage_ani.gif

 

Link to comment
Share on other sites

 

Well ceedj, I haven't had the opportunity to do very much coding lately so I'm kind of rusty and I'm probably just missing the obvious, but this looks like an endless loop[...]

And if the code should only be run once, wouldn't that call for an 'end_thread'? confused.gif

You're completely right, it's a loop that runs endlessly. But that's exactly what we want here, since it's the dead end for the MAIN loop. smile.gif Remember, this is a totally stripped SCM with just a tiny piece of code added, so there isn't even any thread running besides the MAIN thread. end_thread = devil.gif in this case cool.gif

Link to comment
Share on other sites

Knowledge Novice

 

Well ceedj, I haven't had the opportunity to do very much coding lately so I'm kind of rusty and I'm probably just missing the obvious, but this looks like an endless loop[...]

And if the code should only be run once, wouldn't that call for an 'end_thread'? confused.gif

You're completely right, it's a loop that runs endlessly. But that's exactly what we want here, since it's the dead end for the MAIN loop. smile.gif Remember, this is a totally stripped SCM with just a tiny piece of code added, so there isn't even any thread running besides the MAIN thread. end_thread = devil.gif in this case cool.gif

Ok, I see what you mean. I've kind of been out of circulation for a while (except for the occasional post) so there's quite a bit of learning to catch up on. Thanks.

Link to comment
Share on other sites

bosssman100

thankyou for all of your replys just going to try it out now biggrin.gif oh by the way i thorght sandy builder was only for SA thats why I havent used it

Link to comment
Share on other sites

bosssman100

i dont understand why it is still not spawning sad.gif

 

DEFINE VERSION VICE 1.1

 

0002: jump ££Label000010

DEFINE MEMORY 34329

 

:Label000010

0002: jump ££Label000034

DEFINE OBJECTS 1

DEFINE OBJECT GtaScripts.org's MA 2.10 \\ This is an unused object. You can put anything here.

 

:Label000034

0002: jump ££Label000048

DEFINE MISSIONS 0

 

;-------------MAIN---------------

 

 

:Label000048

03A4: name_thread "MAIN"

0111: set_wasted_busted_check_to 1 (enabled)

0180: set_on_mission_flag_to $PLAYER_CHAR

0053: $PLAYER_ACTOR = create_player #NULL at -37.035 -3.046 13.459

0171: set_player $PLAYER_ACTOR z_angle_to 180

016C: restart_if_wasted at 0.0 0.0 0.0 180.0

016D: restart_if_busted at 0.0 0.0 0.0 180.0

00C0: set_current_time 9 0

0169: set_fade_color 0 0 0

016A: fade 0 () 0 ms

0050: gosub ££Label0000DF

0373: set_camera_directly_behind_player

01B6: set_weather 4

0001: wait 500 ms

016A: fade 1 (back) 1500 ms

0050: gosub ££Label0000DF

 

 

:Labelmain2

 

014B: $1872 = init_parked_car_generator #PATRIOT -1 -1 0 alarm 0 door_lock 0 0 10000 at -24.905 0.854 18.159 angle 90

014C: set_parked_car_generator $1872 cars_to_generate_to 101

 

:Loop

0001: wait 1000 ms

0002: jump ££Loop

 

 

:Label0000DF

00D6: if 0

016B: fading

004D: jump_if_false ££Label0000F7

0001: wait 0 ms

0002: jump ££Label0000DF

 

 

:Label0000F7

0051: return

Link to comment
Share on other sites

Sanny Builder supports all 3D GTAs.

 

Change $1872 to $Myfirstcar or whatever.

Is this

 

0180: set_on_mission_flag_to $PLAYER_CHAR

 

a valid line (in terms of game logic)? I guess it is, but the consequence is that this script won't compatible with any code snippet released here.

Please change these 3 lines

0180: set_on_mission_flag_to $PLAYER_CHAR0053: $PLAYER_ACTOR = create_player #NULL at -37.035 -3.046 13.4590171: set_player $PLAYER_ACTOR z_angle_to 180

 

to

0180: set_on_mission_flag_to $ONMISSION0053: $PLAYER_CHAR = create_player #NULL at -37.035 -3.046 13.4590171: set_player $PLAYER_CHAR z_angle_to 180

 

 

Makes it more sensible AND you can actually add code snippets without the need to edit them manually.

Edited by SteaVor
Link to comment
Share on other sites

dertyjerzian
There are some fantastic tutorials over here:

 

http://www.gtaforums.com/index.php?showforum=109

 

that explain exactly what you wish to do. Check out Y_Less's and YeTi's coding tutorials, and please, show some effort before asking someone to "do this" or else it belongs in Recruits and Requests.

 

Thanks and good luck! smile.gif

Why isn't modding more socialized? And truthfully, I have been here two

years give a little and I have read all kinds of scm docs, the only place

I EVER learned anything was from direct forum or chat help from good

friends and from reading people's posts of similar experience.

 

Nothing against the tutorials, they simply do not inform me. <3

Bandy Ban-Ban-Ban. Chugga Chugga Woot Woot.
Link to comment
Share on other sites

 

Well ceedj, I haven't had the opportunity to do very much coding lately so I'm kind of rusty and I'm probably just missing the obvious, but this looks like an endless loop[...]

And if the code should only be run once, wouldn't that call for an 'end_thread'? confused.gif

You're completely right, it's a loop that runs endlessly. But that's exactly what we want here, since it's the dead end for the MAIN loop. smile.gif Remember, this is a totally stripped SCM with just a tiny piece of code added, so there isn't even any thread running besides the MAIN thread. end_thread = devil.gif in this case cool.gif

In fact even the MAIN thread could be ended. At startup the game creates a pseudo-thread that continues until the first wait command. This thread's meaning is to create the player and to make some initialization. What you could see in the stripped main is executed by this thread. It ends when reaches a first wait command (wait 500 after weather 4 in the code posted here). After this, the game loads saved threads (if a save loaded) or continues the code execution (if it's a new game).

 

So, the game can have no active threads at all, but it also has a bug. The bug is that if there's no any active threads (at least one of them), game crashes when saving. Normally, nobody can experience this bug, as if the code to save exists in the script, it means you have one active thread smile.gif. But I experienced this using a CLEO 3 script for saving by pressing F4 button. I tested that script on my stripped scm which had no active threads, and as the CLEO scripts works independently from the SCM, when I tried to save my game, game crashed. When I added the endless loop to the main thread, the saving was successful.

 

 

Link to comment
Share on other sites

 

There are some fantastic tutorials over here:

 

http://www.gtaforums.com/index.php?showforum=109

 

that explain exactly what you wish to do. Check out Y_Less's and YeTi's coding tutorials, and please, show some effort before asking someone to "do this" or else it belongs in Recruits and Requests.

 

Thanks and good luck! smile.gif

Why isn't modding more socialized? And truthfully, I have been here two

years give a little and I have read all kinds of scm docs, the only place

I EVER learned anything was from direct forum or chat help from good

friends and from reading people's posts of similar experience.

 

Nothing against the tutorials, they simply do not inform me. <3

While I partially agree that modding could be more socialized, I find nothing in the first post that

 

A) Shows any kind of effort beyond posting an incomplete stripped script.

 

2) The wording of the post suggests that the person doesn't know the basics. Further posts suggest otherwise, which is why most of us ask to post what you know/have done before asking "OMGWTFDOIDOGIMMIEGIMMIEGIMMIE." Otherwise, you're going to get a lot of answers similar to my first reply - look it up. wink.gif

 

III) As above, inform us*, and we'll try to inform you.

 

*By US I mean, you know, everyone here. I'm helpful, but mostly just decorative. biggrin.gif

Edited by ceedj
Link to comment
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.