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

How to merge 2 Mission Mod in 1 cm File?


Johnson047
 Share

Recommended Posts

Hi all, I want to ask, how to merge 2 or more Custom Mission in 1 *.cm file? Because i want to make a Mission Mod Series but I dont know how to merge it in 1 *.cm file. Can someone help me? This is a example 1st Mission Script :

{$CLEO .cm}

:1stMissionScript_1

thread "MISSION1"

gosub @1stMissionScript_Main_1

wait 0

if

wasted_or_busted

else_jump @1stMissionScript_End_1

gosub @1stMissionScript_Fail_1

 

:1stMissionScript_End_1

gosub @1stMissionScript_Clep_1

end_thread

 

:1stMissionScript_Main_1

increment_mission_attempts

$ONMISSION = 1

054C: use_GXT_table 'MENU2P'

00BC: show_text_highpriority GXT 'MENU_18' time 5000 flag 1

 

:1stMissionScript_2

wait 0

if and

02D8: actor $PLAYER_ACTOR current_weapon == 28

00E1: player 0 pressed_key 17

else_jump @1stMissionScript_2

 

:1stMission_Pass_1

00BA: show_text_styled GXT "M_PASS" time 5000 style 1

return

 

:1stMission_Fail_1

00BA: show_text_styled GXT "M_FAIL" time 5000 style 1

return

 

:1stMission_Clep_1

$ONMISSION = 0

mission_cleanup

return

 

This is a example 2nd Mission Script :

{$CLEO .cm}

 

:2ndMissionScript_1

thread "MISSION1"

gosub @2ndMissionScript_Main_1

wait 0

if

wasted_or_busted

else_jump @2ndMissionScript_End_1

gosub @2ndMissionScript_Fail_1

 

:2ndMissionScript_End_1

gosub @2ndMissionScript_Clep_1

end_thread

 

:2ndMissionScript_Main_1

increment_mission_attempts

$ONMISSION = 1

054C: use_GXT_table 'MENU2P'

00BC: show_text_highpriority GXT 'MENU_18' time 5000 flag 1

 

:2ndMissionScript_2

wait 0

if and

02D8: actor $PLAYER_ACTOR current_weapon == 30

00E1: player 0 pressed_key 17

else_jump @2ndMissionScript_2

 

:2ndMission_Pass_1

00BA: show_text_styled GXT "M_PASS" time 5000 style 1

return

 

:2ndMission_Fail_1

00BA: show_text_styled GXT "M_FAIL" time 5000 style 1

return

 

:2ndMission_Clep_1

$ONMISSION = 0

mission_cleanup

return

 

Can someone help me to merge 2 or more Custom Mission Mod in 1 cm file? Sorry for my bad English

 

Sincerely, Johnson047

Edited by Johnson047
Link to comment
Share on other sites

Use opcodes 0AB3: and 0AB4: to submit selection from mission starter script to mission script

 

example for mission starter script:

(var 12 is used)

 

{$CLEO .cs}thread 'MSTART':MissionTrigger_1wait 0if0256:   player $PLAYER_CHAR definedjf @MissionTrigger_1if$ONMISSION == 0jf @MissionTrigger_1if00FF: actor $PLAYER_ACTOR 1 near_point_3d_on_foot 354.982 2442.75 16.1 radius 2.0 2.0 2.0jf @MissionTrigger_30AB3: var 12 = 0//  <<<---------------- set value of special cleo global var to select first mission !!!!!!!!!!!!!!!0A94: start_custom_mission "CustomMission"$ONMISSION = 1jump @MissionTrigger_1:MissionTrigger_3if00FF: actor $PLAYER_ACTOR 1 near_point_3d_on_foot 454.982 2442.75 16.1 radius 2.0 2.0 2.0jf @MissionTrigger_10AB3: var 12 = 1// <<<---------------- set value of special cleo global var to select second mission !!!!!!!!!!!!!!!0A94: start_custom_mission "CustomMission"$ONMISSION = 1jump @MissionTrigger_1
then do a check for var 12 at the beginning of the mission script

first submit the content of var 12 to a local var, then check the content of the local var

 

{$CLEO .cm}0AB4: [email protected] = var [email protected] ==  0jf @2ndMissionScript_1jump @1stMissionScript_1:1stMissionScript_1thread "MISSION1"gosub @1stMissionScript_Main_1........:2ndMissionScript_1thread "MISSION2"
Edited by ZAZ
Link to comment
Share on other sites

You don't need that. Say, if your missions series would consist of 10 missions, you're going to merge them all into a single file? Much better is to run the second mission when the first one is complete using the start_custom_mission opcode. You need a script that controls which missions are passed and runs the next one.

 

all right, ZAZ was faster :)

Edited by Seemann
  • Like 1
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.