Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    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. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. 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. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    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
    1. Announcements

    2. Forum Support

    3. Suggestions

[Help] (GTA SA) Parachute script not working


GR33N
 Share

Recommended Posts

Hello fellow modders, I've decided to create my own stripped scm with only a few external scripts picked by me. So naturally i started with the first one (player_parachute). The problem is that when I go in-game the player (CJ) does nothing when falling with a parachute. Nothing happends when you press the fire button and he doesn't even go in free fall mode. He keeps falling like he doesn't have a parachute at all. I'm sure its something to do with my code and executing the external script so here is my code:

//-------------MAIN---------------thread 'MAIN' fade 0 0 042C: set_total_missions_to 0 030D: set_max_progress 0 01F0: set_max_wanted_level_to 6 set_wb_check_to 0 00C0: set_current_time_hours_to 6 minutes_to 0 $7 = 300.1 $6 = 301.0 $5 = 202.3 04E4: refresh_game_renderer_at $7 $6 Camera.SetAtPos($7, $6, $5)062A: change_float_stat 165 to 999.0 062A: change_float_stat 23 to 999.0 062A: change_float_stat 21 to 0.0 062A: change_float_stat 163 to 999.0 062A: change_float_stat 160 to 999.0 062A: change_float_stat 229 to 999.0 062A: change_float_stat 223 to 999.0 062A: change_float_stat 230 to 999.0 0629: change_integer_stat 181 to 4 0629: change_integer_stat 68 to 0 $PLAYER_CHAR = Player.Create(0, $7, $6, $5)07AF: $PLAYER_GROUP = player $PLAYER_CHAR group $PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)Camera.SetBehindPlayerActor.Angle($PLAYER_ACTOR) = 262.0set_weather 1 Player.SetClothes($PLAYER_CHAR, "BBALLJACKRSTAR", "BBJACK", Torso)Player.SetClothes($PLAYER_CHAR, "JEANSDENIM", "JEANS", Legs)Player.SetClothes($PLAYER_CHAR, "SNEAKERBINCBLK", "SNEAKER", Shoes)Player.SetClothes($PLAYER_CHAR, "PLAYER_FACE", "HEAD", Head)Player.Build($PLAYER_CHAR)select_interior 0 Player.CanMove($PLAYER_CHAR) = True01B7: release_weatherif    Player.Defined($PLAYER_CHAR)jf @CHECK_SCRIPTS 016C: restart_if_wasted_at 493.5 703.1 11.1 angle 90.0 town_number 0 016C: restart_if_wasted_at -108.3 -974.4 9.4 angle 283.9 town_number 1 016C: restart_if_wasted_at -822.7 1157.9 10.1 angle 4.0 town_number 2 016C: restart_if_wasted_at -885.2 -470.4 12.1 angle 276.0 town_number 1 016D: restart_if_busted_at 508.9 506.8 10.3 angle 174.0 town_number 0 016D: restart_if_busted_at 398.8 -469.7 10.7 angle 323.0 town_number 1 016D: restart_if_busted_at -659.5 760.4 10.5 angle 133.0 town_number 2 016D: restart_if_busted_at -871.9 -682.3 10.2 angle 328.1 town_number 1 wait 0 fade 1 1000 wait 1$FREEFALL_STAGE = 0 $PARACHUTE_CREATION_STAGE = 0 03E6: remove_text_box jump @MAIN_1:MAIN_1//Attempt n1 to load para scriptwait 0jump @PARASCRIPT_LOAD:CHECK_SCRIPTS$SCRIPT_STATUS = 0 :PARASCRIPT_LOADwait 0 if    Player.Defined($PLAYER_CHAR)jf @PARASCRIPT_MOVEON if    Actor.HasWeapon($PLAYER_ACTOR, 46)jf @PARASCRIPT_END 0926: $SCRIPT_STATUS = external_script_status 0 (PLAYER_PARACHUTE) if   $SCRIPT_STATUS == 0 jf @PARASCRIPT_JUMP 08A9: load_external_script 0 (PLAYER_PARACHUTE) if 08AB:   external_script 0 (PLAYER_PARACHUTE) loaded jf @PARASCRIPT_JUMP 0913: run_external_script 0 (PLAYER_PARACHUTE)  :PARASCRIPT_JUMPjump @PARASCRIPT_MOVEON :PARASCRIPT_END090F: end_external_script 0 (PLAYER_PARACHUTE) :PARASCRIPT_MOVEONjump @PARA_LOAD:PARA_LOAD//Load parachute0247: load_model #gun_para038B: load_requested_models:PARA_CHECK//Checking for parachute modelwait 0 ms00D6: if8248:   not model #gun_para available004D: jf @PARA_SPAWN0001: wait 0 ms jump @PARA_LOAD:PARA_SPAWN//Give player parachute01B2: give_actor $PLAYER_ACTOR weapon 46 ammo 10 // Load the weapon model before using this01B9: set_actor $PLAYER_ACTOR armed_weapon_to 46jump @LOOP :LOOPwait 2500jump @LOOP //-------------External script 0 (PLAYER_PARACHUTE)---------------....
Edited by GR33N
Link to comment
Share on other sites

Why you have this code in your main thread part?

:PARA_LOAD//Load parachute0247: load_model #gun_para038B: load_requested_models:PARA_CHECK//Checking for parachute modelwait 0 ms00D6: if8248:   not model #gun_para available004D: jf @PARA_SPAWN0001: wait 0 ms jump @PARA_LOAD:PARA_SPAWN//Give player parachute01B2: give_actor $PLAYER_ACTOR weapon 46 ammo 10 // Load the weapon model before using this01B9: set_actor $PLAYER_ACTOR armed_weapon_to 46jump @LOOP 

It is unnecessary because the external scripts 0 and 1 do all the 'load model #gun_para' stuff.

 

I suppose you are copying the external scripts 0 and 1 from the original main.scm decompiled. If no, then you should do that.

 

 

PS: i haven't read fully your script, so the mistake could be in some other place. If you still experience errors, i can give you a stripped script only with parachute functionality, and then you'll have to compare the two scripts and then see what you were doing wrong.

Edited by Sloth-
Link to comment
Share on other sites

Why you have this code in your main thread part?

 

:PARA_LOAD//Load parachute0247: load_model #gun_para038B: load_requested_models:PARA_CHECK//Checking for parachute modelwait 0 ms00D6: if8248:   not model #gun_para available004D: jf @PARA_SPAWN0001: wait 0 ms jump @PARA_LOAD:PARA_SPAWN//Give player parachute01B2: give_actor $PLAYER_ACTOR weapon 46 ammo 10 // Load the weapon model before using this01B9: set_actor $PLAYER_ACTOR armed_weapon_to 46jump @LOOP 

It is unnecessary because the external scripts 0 and 1 do all the 'load model #gun_para' stuff.

 

I suppose you are copying the external scripts 0 and 1 from the original main.scm decompiled. If no, then you should do that.

 

 

PS: i haven't read fully your script, so the mistake could be in some other place. If you still experience errors, i can give you a stripped script only with parachute functionality, and then you'll have to compare the two scripts and then see what you were doing wrong.

 

Thank you for replying and sorry for not explaining that part. So for quick testing purposes I spawn the player in the air and with that part of the code I give him a parachute and equip him with it so when i start a new game it puts me in the air with a parachute for immediate testing. First I though that the script just wasn't loading fast enough. But even after trying it after a while it ended up not working. I would really appreciate it if you can give me a stripped scm with only parachute functionality as it will give me some inside and i will correct my mistake plus I will also learn how to handle future scripts. Thank you in advance!

 

~GR33N <3

Link to comment
Share on other sites

Here you have it :D

DEFINE MISSIONS 0//DEFINE MISSION {ID} 0 AT {LABEL} @DEFINE EXTERNAL_SCRIPTS 2 // Use -1 in order not to compile AAA script//DEFINE SCRIPT {NAME}  AT {LABEL} @DEFINE SCRIPT PLAYER_PARACHUTE AT @PLCHUTE // 0DEFINE SCRIPT PARACHUTE AT @PARACH // 1DEFINE UNKNOWN_EMPTY_SEGMENT 0DEFINE UNKNOWN_THREADS_MEMORY 0//{$VERSION 3.0.0000}var $PLAYER_CHAR: Playerend // var 03A4: name_thread 'MAIN' 01F0: set_max_wanted_level_to 6 0111: toggle_wasted_busted_check 0 00C0: set_current_time_hours_to 8 minutes_to 0 04E4: unknown_refresh_game_renderer_at 1551.2804 -1352.524703CB: set_rendering_origin_at 1551.2804 -1352.5247 329.46290053: $PLAYER_CHAR = create_player #NULL at 1551.2804 -1352.5247 329.4629 // in front of parachute01F5: $PLAYER_ACTOR = create_player_actor $PLAYER_CHAR 07AF: $PLAYER_GROUP = player $PLAYER_CHAR group 0173: set_actor $PLAYER_ACTOR Z_angle_to 295.00373: set_camera_directly_behind_player 01B6: set_weather 0 0001: wait 0 ms 087B: set_player $PLAYER_CHAR clothes_texture "PLAYER_FACE" model "HEAD" body_part 1 087B: set_player $PLAYER_CHAR clothes_texture "JEANSDENIM" model "JEANS" body_part 2 087B: set_player $PLAYER_CHAR clothes_texture "SNEAKERBINCBLK" model "SNEAKER" body_part 3 087B: set_player $PLAYER_CHAR clothes_texture "VEST" model "VEST" body_part 0 070D: rebuild_player $PLAYER_CHAR 01B4: toggle_player $PLAYER_CHAR can_move 0 016A: fade 0 time 0 04BB: select_interior 0 0629: change_integer_stat 181 to 4 016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0 016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 0 0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here 0004: $DEFAULT_WAIT_TIME = 25003E6: remove_text_box wait 1000 ms016A: fade 1 time 50001B4: toggle_player $PLAYER_CHAR can_move 1// Parachute initialization0005: $1500 = 5.00005: $1501 = -5.00005: $1503 = -1.50005: $1504 = -30.00005: $1505 = 32.00005: $1506 = 0.00213: $GunPara = create_pickup #GUN_PARA type 15 at 1558.0525 -1348.5137 329.4609// put your create_thread commands here004F: create_thread @GeneralLoop:MAIN_LOOP0001: wait $DEFAULT_WAIT_TIME ms00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutes0002: jump @MAIN_LOOP // put your mods (threads) here:GeneralLooprepeatwait 0    // Parachutes    if 0491:   actor $PLAYER_ACTOR has_weapon 46    then        0926: [email protected] = external_script_status 0 (PLAYER_PARACHUTE)         if 0039:   [email protected] == 0        then            08A9: load_external_script 0 (PLAYER_PARACHUTE)             if 08AB:   external_script 0 (PLAYER_PARACHUTE) loaded            then 0913: run_external_script 0 (PLAYER_PARACHUTE)            end        end    else 090F: end_external_script 0 (PLAYER_PARACHUTE)     enduntil false004E: end_thread //-------------Mission 0---------------// put your missions here//-------------External script 0---------------// put your external scripts here//-------------External script (PLAYER_PARACHUTE)---------------{$I external_script_0_parachute.txt}//-------------External script (PARACHUTE)---------------{$I external_script_1_parachute.txt}

I'm spawning the player in front of a parachute in top of the tall building in Los Santos, so you can test the free fall inmediately. You can later do the air spawning with parachute if you want.

 

Please note that the external scripts need some variables related to gravity to initialize, or you will take forever to reach ground...

// Parachute initialization0005: $1500 = 5.00005: $1501 = -5.00005: $1503 = -1.50005: $1504 = -30.00005: $1505 = 32.00005: $1506 = 0.0

You normally will find this part in the Mission 0 (Initialization) in original main.scm decompiled.

 

Hope it helps.

Edited by Sloth-
Link to comment
Share on other sites

Here you have it :D

DEFINE MISSIONS 0//DEFINE MISSION {ID} 0 AT {LABEL} @DEFINE EXTERNAL_SCRIPTS 2 // Use -1 in order not to compile AAA script//DEFINE SCRIPT {NAME}  AT {LABEL} @DEFINE SCRIPT PLAYER_PARACHUTE AT @PLCHUTE // 0DEFINE SCRIPT PARACHUTE AT @PARACH // 1DEFINE UNKNOWN_EMPTY_SEGMENT 0DEFINE UNKNOWN_THREADS_MEMORY 0//{$VERSION 3.0.0000}var $PLAYER_CHAR: Playerend // var 03A4: name_thread 'MAIN' 01F0: set_max_wanted_level_to 6 0111: toggle_wasted_busted_check 0 00C0: set_current_time_hours_to 8 minutes_to 0 04E4: unknown_refresh_game_renderer_at 1551.2804 -1352.524703CB: set_rendering_origin_at 1551.2804 -1352.5247 329.46290053: $PLAYER_CHAR = create_player #NULL at 1551.2804 -1352.5247 329.4629 // in front of parachute01F5: $PLAYER_ACTOR = create_player_actor $PLAYER_CHAR 07AF: $PLAYER_GROUP = player $PLAYER_CHAR group 0173: set_actor $PLAYER_ACTOR Z_angle_to 295.00373: set_camera_directly_behind_player 01B6: set_weather 0 0001: wait 0 ms 087B: set_player $PLAYER_CHAR clothes_texture "PLAYER_FACE" model "HEAD" body_part 1 087B: set_player $PLAYER_CHAR clothes_texture "JEANSDENIM" model "JEANS" body_part 2 087B: set_player $PLAYER_CHAR clothes_texture "SNEAKERBINCBLK" model "SNEAKER" body_part 3 087B: set_player $PLAYER_CHAR clothes_texture "VEST" model "VEST" body_part 0 070D: rebuild_player $PLAYER_CHAR 01B4: toggle_player $PLAYER_CHAR can_move 0 016A: fade 0 time 0 04BB: select_interior 0 0629: change_integer_stat 181 to 4 016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0 016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 0 0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here 0004: $DEFAULT_WAIT_TIME = 25003E6: remove_text_box wait 1000 ms016A: fade 1 time 50001B4: toggle_player $PLAYER_CHAR can_move 1// Parachute initialization0005: $1500 = 5.00005: $1501 = -5.00005: $1503 = -1.50005: $1504 = -30.00005: $1505 = 32.00005: $1506 = 0.00213: $GunPara = create_pickup #GUN_PARA type 15 at 1558.0525 -1348.5137 329.4609// put your create_thread commands here004F: create_thread @GeneralLoop:MAIN_LOOP0001: wait $DEFAULT_WAIT_TIME ms00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutes0002: jump @MAIN_LOOP // put your mods (threads) here:GeneralLooprepeatwait 0    // Parachutes    if 0491:   actor $PLAYER_ACTOR has_weapon 46    then        0926: [email protected] = external_script_status 0 (PLAYER_PARACHUTE)         if 0039:   [email protected] == 0        then            08A9: load_external_script 0 (PLAYER_PARACHUTE)             if 08AB:   external_script 0 (PLAYER_PARACHUTE) loaded            then 0913: run_external_script 0 (PLAYER_PARACHUTE)            end        end    else 090F: end_external_script 0 (PLAYER_PARACHUTE)     enduntil false004E: end_thread //-------------Mission 0---------------// put your missions here//-------------External script 0---------------// put your external scripts here//-------------External script (PLAYER_PARACHUTE)---------------{$I external_script_0_parachute.txt}//-------------External script (PARACHUTE)---------------{$I external_script_1_parachute.txt}

I'm spawning the player in front of a parachute in top of the tall building in Los Santos, so you can test the free fall inmediately. You can later do the air spawning with parachute if you want.

 

Please note that the external scripts need some variables related to gravity to initialize, or you will take forever to reach ground...

// Parachute initialization0005: $1500 = 5.00005: $1501 = -5.00005: $1503 = -1.50005: $1504 = -30.00005: $1505 = 32.00005: $1506 = 0.0

You normally will find this part in the Mission 0 (Initialization) in original main.scm decompiled.

 

Hope it helps.

Thank you, so much! I've managed to fix my mistake using your script. Last thing I would like to know is where do you get information like the parachute initialization variables and tiny details like that, Is it simply from working on things or is there some kind of library that has this information, since i searched for it and nothing shows on google. Thank you for everything!

 

~GR33N <3

Link to comment
Share on other sites

The decompiled main.scm is the best teacher you'll have in scm coding. Everything you need to know is there. You just need some patience, and read code. Is not that difficult as it seems at first impression. Also, you can use the Search tool, when you find some variable suspicious. That's what i did to figure out i needed to initialize variables in parachute script. If some process uses global variables, it is almost for sure they are used in some other place or need initialization.

 

If you're struggling to understand SCM, read basic tutorials first.

 

Separate all the decompiled main.scm code into files. Each external script into one single file, the same for missions and for threads. Is easier to manage that monster if first you cut it into pieces. Maintain one copy on main into one file in order to make searches through all the file.

 

Also, when coding, use high level coding instead of low.

if XXXX: conditionthen    // do somethingelse    // do something elseend

This is easier to read than this:

00D6: ifXXXX:   condition004D: jump_if_false @LABEL_1// do somethingjump @LABEL_2:LABEL1// do something else:LABEL_2

Loops - high vs low level code:

{=====High Level======}repeatwait 0   // do this stuff infinitelyuntil falsewhile truewait 0   // do this stuff infinitelyend{=====Low Level=======}:LOOP_BEGININGwait 0// do this stuff [email protected]_BEGINING

But identation can help you read low level code (specially when studying decompiled main.scm):

00D6: ifXXXX:   condition004D: jump_if_false @LABEL_1    // do something    jump @LABEL_2:LABEL1    // do something else:LABEL_2

Of course, you can always search in google, but sadly, not everything is documented at 100%.

 

When reading main.txt, you really don't need to understand every single line of code, you normally are just searching for particular stuff, like for example, how does the script do this or that, how is this actor spawned into scene, what opcodes do i need to check certain stuff. How can i do to make scenario dark like in that mission when characters do a raid into the Caligula Casino. How script manages to make gyms work. Etc.

Link to comment
Share on other sites

The decompiled main.scm is the best teacher you'll have in scm coding. Everything you need to know is there. You just need some patience, and read code. Is not that difficult as it seems at first impression. Also, you can use the Search tool, when you find some variable suspicious. That's what i did to figure out i needed to initialize variables in parachute script. If some process uses global variables, it is almost for sure they are used in some other place or need initialization.

 

If you're struggling to understand SCM, read basic tutorials first.

 

Separate all the decompiled main.scm code into files. Each external script into one single file, the same for missions and for threads. Is easier to manage that monster if first you cut it into pieces. Maintain one copy on main into one file in order to make searches through all the file.

 

Also, when coding, use high level coding instead of low.

if XXXX: conditionthen    // do somethingelse    // do something elseend

This is easier to read than this:

00D6: ifXXXX:   condition004D: jump_if_false @LABEL_1// do somethingjump @LABEL_2:LABEL1// do something else:LABEL_2

Loops - high vs low level code:

{=====High Level======}repeatwait 0   // do this stuff infinitelyuntil falsewhile truewait 0   // do this stuff infinitelyend{=====Low Level=======}:LOOP_BEGININGwait 0// do this stuff [email protected]_BEGINING

But identation can help you read low level code (specially when studying decompiled main.scm):

00D6: ifXXXX:   condition004D: jump_if_false @LABEL_1    // do something    jump @LABEL_2:LABEL1    // do something else:LABEL_2

Of course, you can always search in google, but sadly, not everything is documented at 100%.

 

When reading main.txt, you really don't need to understand every single line of code, you normally are just searching for particular stuff, like for example, how does the script do this or that, how is this actor spawned into scene, what opcodes do i need to check certain stuff. How can i do to make scenario dark like in that mission when characters do a raid into the Caligula Casino. How script manages to make gyms work. Etc.

 

Thank you again for your patience and understanding. Coming from a 3d background ain't easy when dealing with code, but I am devoted enough to learn and succeed! Really appreciate your help and would not be surprised if I hit another brick wall soon, but hey a few more questions and we're good to go! :D

 

~GR33N <3

Link to comment
Share on other sites

  • 2 years later...
On 4/10/2018 at 12:32 AM, Sloth- said:

Here you have it :D

DEFINE MISSIONS 0//DEFINE MISSION {ID} 0 AT {LABEL} @DEFINE EXTERNAL_SCRIPTS 2 // Use -1 in order not to compile AAA script//DEFINE SCRIPT {NAME}  AT {LABEL} @DEFINE SCRIPT PLAYER_PARACHUTE AT @PLCHUTE // 0DEFINE SCRIPT PARACHUTE AT @PARACH // 1DEFINE UNKNOWN_EMPTY_SEGMENT 0DEFINE UNKNOWN_THREADS_MEMORY 0//{$VERSION 3.0.0000}var $PLAYER_CHAR: Playerend // var 03A4: name_thread 'MAIN' 01F0: set_max_wanted_level_to 6 0111: toggle_wasted_busted_check 0 00C0: set_current_time_hours_to 8 minutes_to 0 04E4: unknown_refresh_game_renderer_at 1551.2804 -1352.524703CB: set_rendering_origin_at 1551.2804 -1352.5247 329.46290053: $PLAYER_CHAR = create_player #NULL at 1551.2804 -1352.5247 329.4629 // in front of parachute01F5: $PLAYER_ACTOR = create_player_actor $PLAYER_CHAR 07AF: $PLAYER_GROUP = player $PLAYER_CHAR group 0173: set_actor $PLAYER_ACTOR Z_angle_to 295.00373: set_camera_directly_behind_player 01B6: set_weather 0 0001: wait 0 ms 087B: set_player $PLAYER_CHAR clothes_texture "PLAYER_FACE" model "HEAD" body_part 1 087B: set_player $PLAYER_CHAR clothes_texture "JEANSDENIM" model "JEANS" body_part 2 087B: set_player $PLAYER_CHAR clothes_texture "SNEAKERBINCBLK" model "SNEAKER" body_part 3 087B: set_player $PLAYER_CHAR clothes_texture "VEST" model "VEST" body_part 0 070D: rebuild_player $PLAYER_CHAR 01B4: toggle_player $PLAYER_CHAR can_move 0 016A: fade 0 time 0 04BB: select_interior 0 0629: change_integer_stat 181 to 4 016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0 016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 0 0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here 0004: $DEFAULT_WAIT_TIME = 25003E6: remove_text_box wait 1000 ms016A: fade 1 time 50001B4: toggle_player $PLAYER_CHAR can_move 1// Parachute initialization0005: $1500 = 5.00005: $1501 = -5.00005: $1503 = -1.50005: $1504 = -30.00005: $1505 = 32.00005: $1506 = 0.00213: $GunPara = create_pickup #GUN_PARA type 15 at 1558.0525 -1348.5137 329.4609// put your create_thread commands here004F: create_thread @GeneralLoop:MAIN_LOOP0001: wait $DEFAULT_WAIT_TIME ms00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutes0002: jump @MAIN_LOOP // put your mods (threads) here:GeneralLooprepeatwait 0    // Parachutes    if 0491:   actor $PLAYER_ACTOR has_weapon 46    then        0926: [email protected] = external_script_status 0 (PLAYER_PARACHUTE)         if 0039:   [email protected] == 0        then            08A9: load_external_script 0 (PLAYER_PARACHUTE)             if 08AB:   external_script 0 (PLAYER_PARACHUTE) loaded            then 0913: run_external_script 0 (PLAYER_PARACHUTE)            end        end    else 090F: end_external_script 0 (PLAYER_PARACHUTE)     enduntil false004E: end_thread //-------------Mission 0---------------// put your missions here//-------------External script 0---------------// put your external scripts here//-------------External script (PLAYER_PARACHUTE)---------------{$I external_script_0_parachute.txt}//-------------External script (PARACHUTE)---------------{$I external_script_1_parachute.txt}

I'm spawning the player in front of a parachute in top of the tall building in Los Santos, so you can test the free fall inmediately. You can later do the air spawning with parachute if you want.

 

Please note that the external scripts need some variables related to gravity to initialize, or you will take forever to reach ground...

// Parachute initialization0005: $1500 = 5.00005: $1501 = -5.00005: $1503 = -1.50005: $1504 = -30.00005: $1505 = 32.00005: $1506 = 0.0

You normally will find this part in the Mission 0 (Initialization) in original main.scm decompiled.

 

Hope it helps.

@Sloth-

Sorry if my bumping may be unconvienient!

Hello, it's been a while and now I'm experiencing the same problem as @GR33N,
I have defined player parachute external script, put the exact script code (took it from main.scm) into my stripped.txd - during the game it is also happenso nothing from being in air with parachute, player just keep falling and about to hit the ground.
I observed the part of code You have pasted, copied it into my stripped.txt, but nothing changes. 
I asume I'm making a mistake since I'm not very cunning in coding, but anyway, can You give me a hand in fixing it? Best option is to check code one more time and describe to me:
    As I can see the important part starts from: 

004F: create_thread @GeneralLoop

- where GeneralLoop is for initiating a parachute external script if player has para as a weapon,
 Am I right?


The rest of my mod features makes no sense due the lack of parachute script...

Thanks in advance!

Link to comment
Share on other sites

Did you noticed this usage?

 

On 4/9/2018 at 11:32 PM, Sloth- said:

Please note that the external scripts need some variables related to gravity to initialize, or you will take forever to reach ground...

// Parachute initialization
0005: $1500 = 5.0
0005: $1501 = -5.0
0005: $1503 = -1.5
0005: $1504 = -30.0
0005: $1505 = 32.0
0005: $1506 = 0.0

You normally will find this part in the Mission 0 (Initialization) in original main.scm decompiled.

 

Hope it helps.

 

 

Click here to get a stripped main with parachute externscript (and parach extern script, parachuting for NPC)

Link to comment
Share on other sites

12 hours ago, ZAZ said:

Did you noticed this usage?

 

 

 

Click here to get a stripped main with parachute externscript (and parach extern script, parachuting for NPC)

@ZAZ 
I have just copied your pastebin data into clean scr.scm and it doesn't work too
 

Spoiler

screenshot - the player just keep falling down

 

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
 Share

  • 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.