Quantcast

Jump to content

» «
Photo

Why My Mission crash if mission failed?

19 replies to this topic
Gian_Yagami
  • Gian_Yagami

    Snitch

  • Members
  • Joined: 08 Nov 2011

#1

Posted 30 March 2012 - 10:32 AM

sorry trouble, could you check this?

Why My Mission crash if mission failed

CODE
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on

{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------
0000: NOP
0@ = Marker.CreateIconAndSphere(61, 2536.422, -1694.349, 13.6471)

:NONAME_24
wait 0
0102:   actor $PLAYER_ACTOR in_sphere 2536.422 -1694.349 13.6471 radius 1.6 1.6 1.6 sphere 0 stopped_on_foot
jf @NONAME_24
023C: load_special_actor 'FAIZ555' as 1 // models 290-299
Model.Load(#NRG500)
Model.Load(#BALLAS1)
Model.Load(#BALLAS2)
Model.Load(#BALLAS3)
023C: load_special_actor 'DECADE' as 2 // models 290-299
Model.Load(#MP5LNG)
Model.Load(#DESERT_EAGLE)
Model.Load(#KATANA)
038B: load_requested_models
04ED: load_animation "GANGS"
Marker.Disable(0@)
$ONMISSION = 1
02A3: enable_widescreen 1
Camera.SetPosition(2525.352, -1704.289, 23.3828, 0.0, 0.0, 0.0)
Camera.PointAt(2525.238, -1717.788, 23.5119, 2)
00BA: show_text_styled GXT 'KRIDE' time 1000 style 2
wait 3000

:NONAME_229
wait 0
if and
  Model.Available(#NRG500)
  Model.Available(#BALLAS1)
  Model.Available(#BALLAS2)
  Model.Available(#BALLAS3)
  Model.Available(#MP5LNG)
  Model.Available(#MP5LNG)
  Model.Available(#DESERT_EAGLE)
023D:   special_actor 1 loaded
023D:   special_actor 2 loaded
jf @NONAME_229

:NONAME_284
wait 0
if
04EE:   animation "GANGS" loaded
jf @NONAME_284
1@ = Actor.Create(CivMale, #SPECIAL01, 2535.664, -1711.413, 13.4528)
Actor.Angle(1@) = 92.0506
Actor.PutAt($PLAYER_ACTOR, 2531.636, -1711.278, 13.463)
Actor.Angle($PLAYER_ACTOR) = 267.9048
Player.CanMove($PLAYER_CHAR) = False
02A3: enable_widescreen 1
Camera.SetPosition(2533.352, -1704.289, 13.3828, 0.0, 0.0, 0.0)
Camera.PointAt(2533.238, -1717.788, 13.5119, 2)
0605: actor 1@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1 // versionA
00BC: show_text_highpriority GXT 'HCISI' time 3000 flag 0
wait 3000
00BC: show_text_highpriority GXT 'BCWAT' time 3000 flag 0
wait 3000
00BC: show_text_highpriority GXT 'HWTGB' time 3000 flag 0
wait 3000
00BC: show_text_highpriority GXT 'TMFO' time 3000 flag 0
wait 2000
Camera.Restore_WithJumpCut
02A3: enable_widescreen 0
0687: clear_actor 1@ task
07AF: $PLAYER_GROUP = player $PLAYER_CHAR group
0631: put_actor 1@ in_group $PLAYER_GROUP
01B2: give_actor 1@ weapon 24 ammo 10 // Load the weapon model before using this
01B9: set_actor 1@ armed_weapon_to 8
081A: set_actor 1@ weapon_skill_to 0
0946: set_actor 1@ actions_uninterupted_by_weapon_fire 1
087E: set_actor 1@ weapon_droppable 1
Actor.Armour(1@) = 150
Actor.Health(1@) = 100
Player.CanMove($PLAYER_CHAR) = True
20@ = Pickup.Create(1242, 3, 2533.86, -1692.545, 13.684)
21@ = Pickup.Create(1240, 3, 2531.971, -1691.268, 13.7228)
2@ = Car.Create(#NRG500, 2509.176, -1671.266, 13.0802)
Car.Angle(2@) = 349.416
3@ = Marker.CreateAboveCar(2@)
Marker.SetColor(3@, 1)
00BC: show_text_highpriority GXT 'GITC' time 3000 flag 0
   
:NONAME_782
wait 0
if or
  not Car.Wrecked(2@)
  not Actor.Dead($PLAYER_ACTOR)
  not Actor.Dead(1@)
0AA0: gosub_if_false @MISSIONFALED
if
  Actor.InCar($PLAYER_ACTOR, 2@)
jf @NONAME_782
00BC: show_text_highpriority GXT 'GTBSD' time 3000 flag 0
Marker.Disable(3@)
018A: 3@ = create_checkpoint_at 2580.396 -2113.083 1.2353
03BC: 4@ = create_sphere_at 2580.396 -2113.083 1.2353 radius 3.0

:NONAME_892
wait 0
if or
  not Car.Wrecked(2@)
  not Actor.Dead($PLAYER_ACTOR)
  not Actor.Dead(1@)
0AA0: gosub_if_false @MISSIONFALED
if
0103:   actor $PLAYER_ACTOR in_sphere 2580.396 -2113.083 1.2353 radius 3.0 3.0 3.0 sphere 0 stopped_in_car
jf @NONAME_892
Marker.Disable(3@)
03BD: destroy_sphere 4@
Player.CanMove($PLAYER_CHAR) = False
02A3: enable_widescreen 1
Camera.SetPosition(2571.298, -2131.141, 0.2417, 0.0, 0.0, 0.0)
Camera.PointAt(2553.847, -2131.96, 0.1888, 2)
5@ = Actor.Create(CivMale, #SPECIAL02, 2559.72, -2135.74, -0.0114)
Actor.Angle(5@) = 357.2468
6@ = Actor.Create(Gang1, #BALLAS1, 2559.714, -2133.241, 0.1261)
Actor.Angle(6@) = 183.6585
7@ = Actor.Create(Gang1, #BALLAS2, 2554.731, -2130.668, 0.2599)
Actor.Angle(7@) = 267.3192
8@ = Actor.Create(Gang1, #BALLAS3, 2554.995, -2130.374, 0.276)
Actor.Angle(8@) = 271.0067
01B2: give_actor 6@ weapon 29 ammo 1000 // Load the weapon model before using this
01B2: give_actor 7@ weapon 29 ammo 1000 // Load the weapon model before using this
01B2: give_actor 8@ weapon 29 ammo 1000 // Load the weapon model before using this
01B2: give_actor 5@ weapon 24 ammo 10 // Load the weapon model before using this
01B2: give_actor 5@ weapon 8 ammo 1 // Load the weapon model before using this
Actor.Armour(5@) = 100
0687: clear_actor 5@ task
0687: clear_actor 6@ task
Actor.Health(5@) = 200
01B9: set_actor 5@ armed_weapon_to 8
01B9: set_actor 6@ armed_weapon_to 29
01B9: set_actor 7@ armed_weapon_to 29
01B9: set_actor 8@ armed_weapon_to 29
081A: set_actor 5@ weapon_skill_to 0
0946: set_actor 5@ actions_uninterupted_by_weapon_fire 1
0946: set_actor 6@ actions_uninterupted_by_weapon_fire 1
0946: set_actor 7@ actions_uninterupted_by_weapon_fire 1
0946: set_actor 8@ actions_uninterupted_by_weapon_fire 1
087E: set_actor 5@ weapon_droppable 1
087E: set_actor 6@ weapon_droppable 1
087E: set_actor 7@ weapon_droppable 1
087E: set_actor 8@ weapon_droppable 1
0633: AS_actor $PLAYER_ACTOR exit_car
0605: actor 5@ perform_animation_sequence "PRTIAL_GNGTLKB" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1 // versionA
0605: actor 6@ perform_animation_sequence "PRTIAL_GNGTLKD" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1 // versionA
0632: release_group $PLAYER_GROUP
00BC: show_text_highpriority GXT 'IGIT' time 3000 flag 0
wait 2000
Player.CanMove($PLAYER_CHAR) = True
02A3: enable_widescreen 0
Camera.Restore_WithJumpCut
0633: AS_actor 1@ exit_car
05E2: AS_actor 1@ kill_actor 5@
0630: put_actor 5@ in_group 9@ as_leader
0631: put_actor 6@ in_group 9@
0631: put_actor 7@ in_group 9@
0631: put_actor 8@ in_group 9@
05E2: AS_actor 5@ kill_actor 1@
05E2: AS_actor 6@ kill_actor $PLAYER_ACTOR
05E2: AS_actor 7@ kill_actor $PLAYER_ACTOR
05E2: AS_actor 8@ kill_actor $PLAYER_ACTOR
10@ = Marker.CreateAboveActor(5@)
11@ = Marker.CreateAboveActor(6@)
12@ = Marker.CreateAboveActor(7@)
13@ = Marker.CreateAboveActor(8@)
Marker.SetColor(10@, 0)
Marker.SetColor(11@, 1073774847)
Marker.SetColor(12@, 1073774847)
Marker.SetColor(13@, 1073774847)

:NONAME_1614
wait 0
if or
  not Actor.Dead($PLAYER_ACTOR)
  not Actor.Dead(1@)
0AA0: gosub_if_false @MISSIONFALED
if and
  Actor.Dead(5@)
  Actor.Dead(6@)
  Actor.Dead(7@)
  Actor.Dead(8@)
jf @NONAME_1614
Marker.Disable(10@)
Marker.Disable(11@)
Marker.Disable(12@)
Marker.Disable(13@)
Actor.StorePos(5@, 14@, 15@, 16@)
17@ = Pickup.Create(1254, 3, 14@, 15@, 16@)
04C4: store_coords_to 30@ 31@ 32@ from_actor 5@ with_offset 0.0 -3.0 0.0
Camera.SetPosition(30@, 31@, 32@, 0.0, 0.0, 0.0)
Camera.PointAt(14@, 15@, 16@, 2)
0512: show_permanent_text_box 'CHBH'
03DC: 25@ = create_marker_above_pickup 17@
Marker.SetColor(25@, 0)
wait 2000
Camera.Restore_WithJumpCut
:NONAME_1819
wait 0
if or                                                          
  not Actor.Dead($PLAYER_ACTOR)
  not Actor.Dead(1@)
0AA0: gosub_if_false @MISSIONFALED
if
  Pickup.Picked_up(17@)
jf @NONAME_1819
03E6: remove_text_box
Pickup.Destroy(17@)
Pickup.Destroy(20@)
Pickup.Destroy(21@)
0394: play_music 1
01E3: show_text_1number_styled GXT 'M_PASS' number 2000 time 5000 style 1  // MISSION PASSED!~n~~w~$~1~
Player.Money($PLAYER_CHAR) += 2000
 $ONMISSION == 0
Actor.RemoveReferences(5@)
Car.RemoveReferences(2@)
Actor.RemoveReferences(6@)
Actor.RemoveReferences(7@)
Actor.RemoveReferences(8@)
Model.Destroy(#NRG500)
Model.Destroy(#DESERT_EAGLE)
Model.Destroy(#MP5LNG)
Model.Destroy(#BALLAS1)
Model.Destroy(#BALLAS2)
Model.Destroy(#BALLAS3)
04EF: release_animation "GANGS"
Marker.Disable(-2)

:MISSIONFALED
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1  // ~r~MISSION FAILED!
$ONMISSION == 0
Actor.RemoveReferences(5@)
Car.RemoveReferences(2@)
Actor.RemoveReferences(6@)
Actor.RemoveReferences(7@)
Actor.RemoveReferences(8@)
04EF: release_animation "GANGS"
Model.Destroy(#NRG500)
Model.Destroy(#DESERT_EAGLE)
Model.Destroy(#MP5LNG)
Model.Destroy(#BALLAS1)
Model.Destroy(#BALLAS2)
Model.Destroy(#BALLAS3)


and Icon 17@ not avaible after Camera.Restore_WithJumpCut . how to fix it?

Joni2030
  • Joni2030

    Prankster

  • Members
  • Joined: 06 Jul 2011

#2

Posted 30 March 2012 - 12:18 PM

1. did you cm file?

Bad.boy!
  • Bad.boy!

    SA modder

  • Feroci
  • Joined: 20 Jun 2010
  • Netherlands

#3

Posted 30 March 2012 - 12:40 PM

Your mission has no end.

@Joni2030 This isn't a proper mission, there is no cm file and no sniffer thread.

Joni2030
  • Joni2030

    Prankster

  • Members
  • Joined: 06 Jul 2011

#4

Posted 30 March 2012 - 01:20 PM

aaa okey sorry my bad blush.gif blush.gif blush.gif blush.gif

Gian_Yagami
  • Gian_Yagami

    Snitch

  • Members
  • Joined: 08 Nov 2011

#5

Posted 02 April 2012 - 08:04 AM Edited by Gian_Yagami, 02 April 2012 - 08:08 AM.

Sorry late relpy.

so? how? confused.gif please...
what cleo mission must be in cm format
yeah, I think cm = Cleo Mission . that's true?

Ashwin.Star
  • Ashwin.Star

    Back for Next ♪♫

  • Members
  • Joined: 14 Nov 2010
  • India

#6

Posted 02 April 2012 - 08:20 AM

CODE
0AA0: gosub_if_false @MISSIONFALED

use "jf" instead, otherwise put "return" at the END of script,

Dutchy3010
  • Dutchy3010

    Female SCM coder!

  • Moderator
  • Joined: 30 Jul 2006
  • Netherlands
  • Best Script 2013 [DYOM]
    Best Script 2012 [DYOM]

#7

Posted 02 April 2012 - 11:04 AM

Besides, use the end_custom_script code at the end. But then you can't replay the mission. You should try to make a proper mission. You can use the tutorial of ZAZ.

Gian_Yagami
  • Gian_Yagami

    Snitch

  • Members
  • Joined: 08 Nov 2011

#8

Posted 04 April 2012 - 08:13 AM

and this?
QUOTE
Icon 17@ not avaible after Camera.Restore_WithJumpCut. how to fix it?

Bad.boy!
  • Bad.boy!

    SA modder

  • Feroci
  • Joined: 20 Jun 2010
  • Netherlands

#9

Posted 04 April 2012 - 01:06 PM

Do you mean pickup 17@, or marker 25@?

Is the camera in the right position in your script? Because you used a timer (32@) as a coord (after you created the pickup).
CODE
04C4: store_coords_to 30@ 31@ 32@ from_actor 5@ with_offset 0.0 -3.0 0.0
Camera.SetPosition(30@, 31@, 32@, 0.0, 0.0, 0.0)

Gian_Yagami
  • Gian_Yagami

    Snitch

  • Members
  • Joined: 08 Nov 2011

#10

Posted 05 April 2012 - 08:21 AM

so what should I change to fix icon 17@?

& why first and second parameter not work?

CODE
:NONAME_782
wait 0
if or
  not Car.Wrecked(2@)
  not Actor.Dead($PLAYER_ACTOR)
  not Actor.Dead(1@)
0AA0: gosub_if_false @MISSIONFAILED


if
Actor.InCar($PLAYER_ACTOR, 2@)
jf @NONAME_782
00BC: show_text_highpriority GXT 'GTBSD' time 3000 flag 0
Marker.Disable(3@)
018A: 3@ = create_checkpoint_at 2580.396 -2113.083 1.2353
03BC: 4@ = create_sphere_at 2580.396 -2113.083 1.2353 radius 3.0
CODE
:NONAME_892
wait 0
if or
  not Car.Wrecked(2@)
  not Actor.Dead($PLAYER_ACTOR)
  not Actor.Dead(1@)
0AA0: gosub_if_false @MISSIONFAILED


I kill Actor 1 after this code for cutscene:

CODE
02A3: enable_widescreen 1
Camera.SetPosition(2533.352, -1704.289, 13.3828, 0.0, 0.0, 0.0)
Camera.PointAt(2533.238, -1717.788, 13.5119, 2)
0605: actor 1@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1 // versionA
00BC: show_text_highpriority GXT 'HCISI' time 3000 flag 0
wait 3000
00BC: show_text_highpriority GXT 'BCWAT' time 3000 flag 0
wait 3000
00BC: show_text_highpriority GXT 'HWTGB' time 3000 flag 0
wait 3000
00BC: show_text_highpriority GXT 'TMFO' time 3000 flag 0
wait 2000
Camera.Restore_WithJumpCut
02A3: enable_widescreen 0
0687: clear_actor 1@ task
07AF: $PLAYER_GROUP = player $PLAYER_CHAR group
0631: put_actor 1@ in_group $PLAYER_GROUP
01B2: give_actor 1@ weapon 24 ammo 10 // Load the weapon model before using this
01B9: set_actor 1@ armed_weapon_to 8
081A: set_actor 1@ weapon_skill_to 0
0946: set_actor 1@ actions_uninterupted_by_weapon_fire 1
087E: set_actor 1@ weapon_droppable 1
Actor.Armour(1@) = 150
Actor.Health(1@) = 100
Player.CanMove($PLAYER_CHAR) = True
20@ = Pickup.Create(1242, 3, 2533.86, -1692.545, 13.684)
21@ = Pickup.Create(1240, 3, 2531.971, -1691.268, 13.7228)
2@ = Car.Create(#NRG500, 2509.176, -1671.266, 13.0802)
Car.Angle(2@) = 349.416
3@ = Marker.CreateAboveCar(2@)
Marker.SetColor(3@, 1)
00BC: show_text_highpriority GXT 'GITC' time 3000 flag 0


and mission failed text appears after CJ go to chekpoint

CODE
018A: 3@ = create_checkpoint_at 2580.396 -2113.083 1.2353
03BC: 4@ = create_sphere_at 2580.396 -2113.083 1.2353 radius 3.0
[code=auto:0]

Bad.boy!
  • Bad.boy!

    SA modder

  • Feroci
  • Joined: 20 Jun 2010
  • Netherlands

#11

Posted 05 April 2012 - 02:03 PM

Maybe try to use an other local because you use 3@ again when you have just disabled it. Also, if you succeed your mission, you jump automatically to the mission fail part. And could you post your full updated script?

If you can, you should try to put your mission in this format (needs a sniffer thread):
CODE
{$CLEO .cm}

:MyMission
thread "MyMission"
gosub @MissionStart
if
 wasted_or_busted
then
 gosub @MissionFailed
end
gosub @MissionCleanup
end_thread

:MissionStart
gosub @MissionPassed
return

:MissionPassed
wait 500
01E3: text_1number_styled 'M_PASSD' 0 5000 ms 1 // MISSION PASSED!
return

:MissionFailed
00BA: text_styled 'M_FAIL' 5000 ms 1 // ~r~MISSION FAILED!
return

:MissionCleanup
$ONMISSION = 0 // integer values
mission_cleanup
return

Gian_Yagami
  • Gian_Yagami

    Snitch

  • Members
  • Joined: 08 Nov 2011

#12

Posted 06 April 2012 - 09:35 AM

sure smile.gif this my script:

CODE
{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------
0000: NOP
0@ = Marker.CreateIconAndSphere(61, 2536.422, -1694.349, 13.6471)

:NONAME_24
wait 0
0102:   actor $PLAYER_ACTOR in_sphere 2536.422 -1694.349 13.6471 radius 1.6 1.6 1.6 sphere 0 stopped_on_foot
jf @NONAME_24
023C: load_special_actor 'FAIZ555' as 1 // models 290-299
Model.Load(#NRG500)
Model.Load(#BALLAS1)
Model.Load(#BALLAS2)
Model.Load(#BALLAS3)
023C: load_special_actor 'DECADE' as 2 // models 290-299
Model.Load(#MP5LNG)
Model.Load(#DESERT_EAGLE)
Model.Load(#KATANA)
038B: load_requested_models
04ED: load_animation "GANGS"
Marker.Disable(0@)
$ONMISSION = 1
02A3: enable_widescreen 1
Camera.SetPosition(2525.352, -1704.289, 23.3828, 0.0, 0.0, 0.0)
Camera.PointAt(2525.238, -1717.788, 23.5119, 2)
00BA: show_text_styled GXT 'KRIDE' time 1000 style 2
wait 3000

:NONAME_229
wait 0
if and
  Model.Available(#NRG500)
  Model.Available(#BALLAS1)
  Model.Available(#BALLAS2)
  Model.Available(#BALLAS3)
  Model.Available(#MP5LNG)
  Model.Available(#MP5LNG)
  Model.Available(#DESERT_EAGLE)
023D:   special_actor 1 loaded
023D:   special_actor 2 loaded
jf @NONAME_229

:NONAME_284
wait 0
if
04EE:   animation "GANGS" loaded
jf @NONAME_284
1@ = Actor.Create(CivMale, #SPECIAL01, 2535.664, -1711.413, 13.4528)
Actor.Angle(1@) = 92.0506
Actor.PutAt($PLAYER_ACTOR, 2531.636, -1711.278, 13.463)
Actor.Angle($PLAYER_ACTOR) = 267.9048
Player.CanMove($PLAYER_CHAR) = False
02A3: enable_widescreen 1
Camera.SetPosition(2533.352, -1704.289, 13.3828, 0.0, 0.0, 0.0)
Camera.PointAt(2533.238, -1717.788, 13.5119, 2)
0605: actor 1@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1 // versionA
00BC: show_text_highpriority GXT 'HCISI' time 3000 flag 0
wait 3000
00BC: show_text_highpriority GXT 'BCWAT' time 3000 flag 0
wait 3000
00BC: show_text_highpriority GXT 'HWTGB' time 3000 flag 0
wait 3000
00BC: show_text_highpriority GXT 'TMFO' time 3000 flag 0
wait 2000
Camera.Restore_WithJumpCut
02A3: enable_widescreen 0
0687: clear_actor 1@ task
07AF: $PLAYER_GROUP = player $PLAYER_CHAR group
0631: put_actor 1@ in_group $PLAYER_GROUP
01B2: give_actor 1@ weapon 24 ammo 10 // Load the weapon model before using this
01B9: set_actor 1@ armed_weapon_to 8
081A: set_actor 1@ weapon_skill_to 0
0946: set_actor 1@ actions_uninterupted_by_weapon_fire 1
087E: set_actor 1@ weapon_droppable 1
Actor.Armour(1@) = 150
Actor.Health(1@) = 100
Player.CanMove($PLAYER_CHAR) = True
20@ = Pickup.Create(1242, 3, 2533.86, -1692.545, 13.684)
21@ = Pickup.Create(1240, 3, 2531.971, -1691.268, 13.7228)
2@ = Car.Create(#NRG500, 2509.176, -1671.266, 13.0802)
Car.Angle(2@) = 349.416
3@ = Marker.CreateAboveCar(2@)
Marker.SetColor(3@, 1)
00BC: show_text_highpriority GXT 'GITC' time 3000 flag 0
:NONAME_782
wait 0
if or
  not Car.Wrecked(2@)
  not Actor.Dead($PLAYER_ACTOR)
  not Actor.Dead(1@)
0AA0: gosub_if_false @MISSIONFAILED
if
  Actor.InCar($PLAYER_ACTOR, 2@)
jf @NONAME_782
00BC: show_text_highpriority GXT 'GTBSD' time 3000 flag 0
Marker.Disable(3@)
018A: 3@ = create_checkpoint_at 2580.396 -2113.083 1.2353
03BC: 4@ = create_sphere_at 2580.396 -2113.083 1.2353 radius 3.0
:NONAME_892
wait 0
if or
  not Car.Wrecked(2@)
  not Actor.Dead($PLAYER_ACTOR)
  not Actor.Dead(1@)
0AA0: gosub_if_false @MISSIONFAILED
if
0103:   actor $PLAYER_ACTOR in_sphere 2580.396 -2113.083 1.2353 radius 3.0 3.0 3.0 sphere 0 stopped_in_car
jf @NONAME_892
Marker.Disable(3@)
03BD: destroy_sphere 4@
Player.CanMove($PLAYER_CHAR) = False
02A3: enable_widescreen 1
Camera.SetPosition(2571.298, -2131.141, 0.2417, 0.0, 0.0, 0.0)
Camera.PointAt(2553.847, -2131.96, 0.1888, 2)
5@ = Actor.Create(CivMale, #SPECIAL02, 2559.72, -2135.74, -0.0114)
Actor.Angle(5@) = 357.2468
6@ = Actor.Create(Gang1, #BALLAS1, 2559.714, -2133.241, 0.1261)
Actor.Angle(6@) = 183.6585
7@ = Actor.Create(Gang1, #BALLAS2, 2554.731, -2130.668, 0.2599)
Actor.Angle(7@) = 267.3192
8@ = Actor.Create(Gang1, #BALLAS3, 2554.995, -2130.374, 0.276)
Actor.Angle(8@) = 271.0067
01B2: give_actor 6@ weapon 29 ammo 1000 // Load the weapon model before using this
01B2: give_actor 7@ weapon 29 ammo 1000 // Load the weapon model before using this
01B2: give_actor 8@ weapon 29 ammo 1000 // Load the weapon model before using this
01B2: give_actor 5@ weapon 24 ammo 10 // Load the weapon model before using this
01B2: give_actor 5@ weapon 8 ammo 1 // Load the weapon model before using this
Actor.Armour(5@) = 100
0687: clear_actor 5@ task
0687: clear_actor 6@ task
Actor.Health(5@) = 200
01B9: set_actor 5@ armed_weapon_to 8
01B9: set_actor 6@ armed_weapon_to 29
01B9: set_actor 7@ armed_weapon_to 29
01B9: set_actor 8@ armed_weapon_to 29
081A: set_actor 5@ weapon_skill_to 0
0946: set_actor 5@ actions_uninterupted_by_weapon_fire 1
0946: set_actor 6@ actions_uninterupted_by_weapon_fire 1
0946: set_actor 7@ actions_uninterupted_by_weapon_fire 1
0946: set_actor 8@ actions_uninterupted_by_weapon_fire 1
087E: set_actor 5@ weapon_droppable 1
087E: set_actor 6@ weapon_droppable 1
087E: set_actor 7@ weapon_droppable 1
087E: set_actor 8@ weapon_droppable 1
0633: AS_actor $PLAYER_ACTOR exit_car
0605: actor 5@ perform_animation_sequence "PRTIAL_GNGTLKB" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1 // versionA
0605: actor 6@ perform_animation_sequence "PRTIAL_GNGTLKD" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1 // versionA
0632: release_group $PLAYER_GROUP
00BC: show_text_highpriority GXT 'IGIT' time 3000 flag 0
wait 2000
Player.CanMove($PLAYER_CHAR) = True
02A3: enable_widescreen 0
Camera.Restore_WithJumpCut
0633: AS_actor 1@ exit_car
05E2: AS_actor 1@ kill_actor 5@
0630: put_actor 5@ in_group 9@ as_leader
0631: put_actor 6@ in_group 9@
0631: put_actor 7@ in_group 9@
0631: put_actor 8@ in_group 9@
05E2: AS_actor 5@ kill_actor 1@
05E2: AS_actor 6@ kill_actor $PLAYER_ACTOR
05E2: AS_actor 7@ kill_actor $PLAYER_ACTOR
05E2: AS_actor 8@ kill_actor $PLAYER_ACTOR
10@ = Marker.CreateAboveActor(5@)
11@ = Marker.CreateAboveActor(6@)
12@ = Marker.CreateAboveActor(7@)
13@ = Marker.CreateAboveActor(8@)
Marker.SetColor(10@, 0)
Marker.SetColor(11@, 1073774847)
Marker.SetColor(12@, 1073774847)
Marker.SetColor(13@, 1073774847)

:NONAME_1614
wait 0
if or
  not Actor.Dead($PLAYER_ACTOR)
  not Actor.Dead(1@)
0AA0: gosub_if_false @MISSIONFAILED
if and
  Actor.Dead(5@)
  Actor.Dead(6@)
  Actor.Dead(7@)
  Actor.Dead(8@)
jf @NONAME_1614
Marker.Disable(10@)
Marker.Disable(11@)
Marker.Disable(12@)
Marker.Disable(13@)
Actor.StorePos(5@, 14@, 15@, 16@)
17@ = Pickup.Create(1254, 3, 14@, 15@, 16@)
04C4: store_coords_to 30@ 31@ 32@ from_actor 5@ with_offset 0.0 -3.0 0.0
Camera.SetPosition(30@, 31@, 32@, 0.0, 0.0, 0.0)
Camera.PointAt(14@, 15@, 16@, 2)
0512: show_permanent_text_box 'CHBH'
03DC: 25@ = create_marker_above_pickup 17@
Marker.SetColor(25@, 0)

:NONAME_1819
wait 0
if or                                                          
  not Actor.Dead($PLAYER_ACTOR)
  not Actor.Dead(1@)
0AA0: gosub_if_false @MISSIONFAILED
if
  Pickup.Picked_up(17@)
jf @NONAME_1819
03E6: remove_text_box
Pickup.Destroy(17@)
Pickup.Destroy(20@)
Pickup.Destroy(21@)
0394: play_music 1
01E3: show_text_1number_styled GXT 'M_PASS' number 2000 time 5000 style 1  // MISSION PASSED!~n~~w~$~1~
Player.Money($PLAYER_CHAR) += 2000
 $ONMISSION == 0
Actor.RemoveReferences(5@)
Car.RemoveReferences(2@)
Actor.RemoveReferences(6@)
Actor.RemoveReferences(7@)
Actor.RemoveReferences(8@)
Model.Destroy(#NRG500)
Model.Destroy(#DESERT_EAGLE)
Model.Destroy(#MP5LNG)
Model.Destroy(#BALLAS1)
Model.Destroy(#BALLAS2)
Model.Destroy(#BALLAS3)
04EF: release_animation "GANGS"
Marker.Disable(-2)

:MISSIONFAILED
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1  // ~r~MISSION FAILED!
$ONMISSION == 0
Actor.RemoveReferences(5@)
Car.RemoveReferences(2@)
Actor.RemoveReferences(6@)
Actor.RemoveReferences(7@)
Actor.RemoveReferences(8@)
04EF: release_animation "GANGS"
Model.Destroy(#NRG500)
Model.Destroy(#DESERT_EAGLE)
Model.Destroy(#MP5LNG)
Model.Destroy(#BALLAS1)
Model.Destroy(#BALLAS2)
Model.Destroy(#BALLAS3)
return

Bad.boy!
  • Bad.boy!

    SA modder

  • Feroci
  • Joined: 20 Jun 2010
  • Netherlands

#13

Posted 06 April 2012 - 12:19 PM

You have done some things wrong, you used gosub at every check if mission failed. Gosub works like this.

CODE
:MISSION_1
wait 0
if
12@ == 3
0AA0: gosub_if_false @MISSION_2
jump @MISSION_3

:MISSION_2
12@ = 3
return

:MISSION_3
...


If 12@ isn't 3 the code jumps to :MISSION_2 sets 12@ = 3 and returns to the place where the jump came from. Then the code jumps to :MISSION_3 and the rest of the code. Gosubs are usefull for checks or other things that have to be done many times.

In your case you used gosub wrong:
CODE
:NONAME_782
wait 0
if or
 not Car.Wrecked(2@) // You need to leave "not" here if you want to check if the car is wrecked btw
 not Actor.Dead($PLAYER_ACTOR)
 not Actor.Dead(1@)
0AA0: gosub_if_false @MISSIONFAILED
if
 Actor.InCar($PLAYER_ACTOR, 2@)
jf @NONAME_782


The game will jump to Mission failed, but at the end is a return, and the code will jump back to here again.
You'll need to change it to:
CODE
:NONAME_892
wait 0
if or
 Car.Wrecked(2@) // I assume you want to go to Mission failed if the car is wrecked.
 not Actor.Dead($PLAYER_ACTOR)
 not Actor.Dead(1@)
jf @MISSIONFAILED
if
0103:   actor $PLAYER_ACTOR in_sphere 2580.396 -2113.083 1.2353 radius 3.0 3.0 3.0 sphere 0 stopped_in_car
jf @NONAME_892


And at the end you need to change some thing,
CODE
:MISSIONFAILED
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1  // ~r~MISSION FAILED!
$ONMISSION == 0
Actor.RemoveReferences(5@)
Car.RemoveReferences(2@)
Actor.RemoveReferences(6@)
Actor.RemoveReferences(7@)
Actor.RemoveReferences(8@)
04EF: release_animation "GANGS"
Model.Destroy(#NRG500)
Model.Destroy(#DESERT_EAGLE)
Model.Destroy(#MP5LNG)
Model.Destroy(#BALLAS1)
Model.Destroy(#BALLAS2)
Model.Destroy(#BALLAS3)
0296: unload_special_actor 1 // You forgot this
0296: unload_special_actor 2 // And this
jump @NONAME_24 // I assume you want to have the chanse to start over again


You will also need to check if some actors (and other things) are defined and remove refrence to them, if you want to do the cleanup part correct.

You always see mission failed, because the mission succeed part isn't correct either.
CODE
:NONAME_1819
wait 0
if or                                                          
 not Actor.Dead($PLAYER_ACTOR)
 not Actor.Dead(1@)
jf @MISSIONFAILED
if
 Pickup.Picked_up(17@)
jf @NONAME_1819
03E6: remove_text_box
Pickup.Destroy(17@)
Pickup.Destroy(20@)
Pickup.Destroy(21@)
0394: play_music 1
01E3: show_text_1number_styled GXT 'M_PASS' number 2000 time 5000 style 1  // MISSION PASSED!~n~~w~$~1~
Player.Money($PLAYER_CHAR) += 2000
$ONMISSION == 0
Actor.RemoveReferences(5@)
Car.RemoveReferences(2@)
Actor.RemoveReferences(6@)
Actor.RemoveReferences(7@)
Actor.RemoveReferences(8@)
// you need to check all the actors, spheres and cars over here to.
Model.Destroy(#NRG500)
Model.Destroy(#DESERT_EAGLE)
Model.Destroy(#MP5LNG)
Model.Destroy(#BALLAS1)
Model.Destroy(#BALLAS2)
Model.Destroy(#BALLAS3)
0296: unload_special_actor 1 // Same thing
0296: unload_special_actor 2 // Same thing
04EF: release_animation "GANGS"
Marker.Disable(-2) // What marker
0A93: end_custom_thread // If you wan't to be able to play the mission again, you need to use "jump @NONAME_24"


As you can see you made 2 cleanups, here you should use gosub.
CODE
:MISSION_FAIL
gosub @CLEANUP
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1  // ~r~MISSION FAILED!
jump @NONAME_24

:MISSION_PASS
gosub @CLEANUP
0394: play_music 1
01E3: show_text_1number_styled GXT 'M_PASS' number 2000 time 5000 style 1  // MISSION PASSED!~n~~w~$~1~
0A93: end_custom_thread

:MISSION_CLEANUP
// Here the things you need to destroy and unload
return


For the next time keep in mind, if you write this:
CODE
:MISSION_1
// Do something

:MISSION_2
// something


The code will automatically jump from :MISSION_1 to :MISSION_2

Silent
  • Silent

    Moderating Cookie Monster

  • Feroci
  • Joined: 01 Feb 2010
  • Poland
  • Most Helpful [GTA] 2013
    Most Helpful [Modding] 2013
    Most Talented [Modding] 2013
    Best Map 2013 "ViceCityStories PC Edition"
    Best Vehicle 2013 "III Aircraft"
    Most Helpful [Modding] 2012
    Modder of the Year 2012

#14

Posted 06 April 2012 - 12:35 PM

Mission not following proper syntax (if wastedandbusted header) will ALWAYS crash when player is dead. $ONMISSION activates the proper "on mission" mode which requires this syntax. See original SA/VC/III missions and see how they begin.

Gian_Yagami
  • Gian_Yagami

    Snitch

  • Members
  • Joined: 08 Nov 2011

#15

Posted 07 April 2012 - 09:57 AM

@BadBoy: I do not understand about the gosub.
what it means 12@ == 3 & 12@ = 3 in your example script? confused.gif

so, I must Replace code: 0AA0: gosub_if_false to jf in row script :NONAME_782 .

but I've read. jump code to read the code above/before. Is that right? then jf it's an extension of jump if false. what function does same? but I write the row code :MISSIONFAILED at the end. and row :NONAME_782 and row :NONAME892

@SilentPL: so which is it? confused.gif

LINK/2012
  • LINK/2012

    LIVIN' IN CODE

  • Feroci
  • Joined: 30 Jan 2011
  • Brazil

#16

Posted 07 April 2012 - 03:10 PM

QUOTE (Gian_Yagami @ Saturday, Apr 7 2012, 06:57)
@SilentPL: so which is it?  confused.gif

You should be using a .cm file, the mission things only works in a mission thread.

In a mission thread when the player is wasted or busted the script returns from every gosub, so the rockstar syntax is:

CODE

gosub @MyMission
if wasted_or_busted   // returned from the sub because player is wasted\busted?
then
  gosub @MissionFailed
end
gosub @MissionCleanup
end_thread

:MyMission
0317: increment_mission_attempts
$ONMISSION = 1
// the mission here, if the player is wasted or busted the script engine will return all the gosubs
return

:MissionFailed
// Mission failed text etc
return

:MissionCleanup
// Here you clean everything that you used in the mission
$ONMISSION = 0
00D8: mission_cleanup
return

Gian_Yagami
  • Gian_Yagami

    Snitch

  • Members
  • Joined: 08 Nov 2011

#17

Posted 08 April 2012 - 09:00 AM

@Link2012: oh, thanks smile.gif

QUOTE
what it means 12@ == 3 & 12@ = 3 in your example script? 

so, I must Replace code: 0AA0: gosub_if_false to jf in row script :NONAME_782.

but I've read. jump code to read the code above/before. Is that right? then jf it's an extension of jump if false. what function does same? but I write the row code :MISSIONFAILED at the end. and row :NONAME_782 and row :NONAME892


whatsthat.gif I'm still waiting for answers.

Bad.boy!
  • Bad.boy!

    SA modder

  • Feroci
  • Joined: 20 Jun 2010
  • Netherlands

#18

Posted 08 April 2012 - 12:41 PM Edited by Bad.boy!, 08 April 2012 - 03:38 PM.

QUOTE
but I've read. jump code to read the code above/before. Is that right? then jf it's an extension of jump if false. what function does same? but I write the row code :MISSIONFAILED at the end. and row :NONAME_782 and row :NONAME892


I don't understand you. 12@ was just an example. And you have to replace gosub everywere. Your script should look like this now.

Sniffer (you can use 0AB3 instead of global variables but this one should be free):
CODE
thread 'SNIFFER'
$8301 = 0
0@ = Marker.CreateIconAndSphere(61, 2536.422, -1694.349, 13.6471)

:SNIFFER_24
wait 0
if and
  00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere 2536.422 -1694.349 13.6471 radius 1.6 1.6 1.6 on_foot
  Player.Controllable($PLAYER_CHAR)
  $8301 == 0
jf @SNIFFER_130
$ONMISSION = 1
{00BA: show_text_styled GXT 'X' time 1000 style 2 // You could put your mission name here}  
0A94: start_custom_mission "MISSION1"
fade 0 250
Marker.Disable(0@)
jump @SNIFFER_24

:SNIFFER_130
if
  $ONMISSION == 1
jf @SNIFFER_160
repeat
   wait $DEFAULT_WAIT_TIME
until $ONMISSION == 0
if
   $8301 == 0
jf @SNIFFER_160
0@ = Marker.CreateIconAndSphere(61, 2536.422, -1694.349, 13.6471)
jump @SNIFFER_24  

:SNIFFER_160
if
$8301 == 1
jf @SNIFFER_24
Marker.Disable(0@)
0A93: end_custom_thread


Mission (you can use up to 1024 locals in this construction):
CODE
{$CLEO .cm}

Thread 'MISSION1'
gosub @MyMission
if wasted_or_busted   // returned from the sub because player is wasted\busted?
then
 gosub @MissionFailed
end
gosub @MissionCleanup
end_thread

:MyMission
0317: increment_mission_attempts
wait 250
Model.Load(#NRG500)
Model.Load(#BALLAS1)
Model.Load(#BALLAS2)
Model.Load(#BALLAS3)
Model.Load(#MP5LNG)
Model.Load(#DESERT_EAGLE)
Model.Load(#KATANA)
023C: load_special_actor 'FAIZ555' as 1 // models 290-299
023C: load_special_actor 'DECADE' as 2 // models 290-299
04ED: load_animation "GANGS"
038B: load_requested_models
repeat
   wait 0
until 04EE:   animation "GANGS" loaded  
02A3: enable_widescreen 1
Camera.SetPosition(2525.352, -1704.289, 23.3828, 0.0, 0.0, 0.0)
Camera.PointAt(2525.238, -1717.788, 23.5119, 2)
fade 1 250
wait 250
00BA: show_text_styled GXT 'KRIDE' time 1000 style 2
wait 3000
1@ = Actor.Create(CivMale, #SPECIAL01, 2535.664, -1711.413, 13.4528)
Actor.Angle(1@) = 92.0506
Actor.PutAt($PLAYER_ACTOR, 2531.636, -1711.278, 13.463)
Actor.Angle($PLAYER_ACTOR) = 267.9048
Player.CanMove($PLAYER_CHAR) = False
02A3: enable_widescreen 1
Camera.SetPosition(2533.352, -1704.289, 13.3828, 0.0, 0.0, 0.0)
Camera.PointAt(2533.238, -1717.788, 13.5119, 2)
0605: actor 1@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1 // versionA
00BC: show_text_highpriority GXT 'HCISI' time 3000 flag 0
wait 3000
00BC: show_text_highpriority GXT 'BCWAT' time 3000 flag 0
wait 3000
00BC: show_text_highpriority GXT 'HWTGB' time 3000 flag 0
wait 3000
00BC: show_text_highpriority GXT 'TMFO' time 3000 flag 0
wait 2000
Camera.Restore_WithJumpCut
02A3: enable_widescreen 0
0687: clear_actor 1@ task
07AF: $PLAYER_GROUP = player $PLAYER_CHAR group
0631: put_actor 1@ in_group $PLAYER_GROUP
01B2: give_actor 1@ weapon 24 ammo 10 // Load the weapon model before using this
01B9: set_actor 1@ armed_weapon_to 8
081A: set_actor 1@ weapon_skill_to 0
0946: set_actor 1@ actions_uninterupted_by_weapon_fire 1
087E: set_actor 1@ weapon_droppable 1
Actor.Armour(1@) = 150
Actor.Health(1@) = 100
Player.CanMove($PLAYER_CHAR) = True
20@ = Pickup.Create(1242, 3, 2533.86, -1692.545, 13.684)
21@ = Pickup.Create(1240, 3, 2531.971, -1691.268, 13.7228)
2@ = Car.Create(#NRG500, 2509.176, -1671.266, 13.0802)
Car.Angle(2@) = 349.416
3@ = Marker.CreateAboveCar(2@)
Marker.SetColor(3@, 1)
00BC: show_text_highpriority GXT 'GITC' time 3000 flag 0

:NONAME_782
wait 0
if or
 not Car.Wrecked(2@)
 not Actor.Dead($PLAYER_ACTOR)
 not Actor.Dead(1@)
jf @FAIL
if
 Actor.InCar($PLAYER_ACTOR, 2@)
jf @NONAME_782
00BC: show_text_highpriority GXT 'GTBSD' time 3000 flag 0
Marker.Disable(3@)
018A: 3@ = create_checkpoint_at 2580.396 -2113.083 1.2353
03BC: 4@ = create_sphere_at 2580.396 -2113.083 1.2353 radius 3.0
:NONAME_892
wait 0
if or
 not Car.Wrecked(2@)
 not Actor.Dead($PLAYER_ACTOR)
 not Actor.Dead(1@)
jf @FAIL
if
0103:   actor $PLAYER_ACTOR in_sphere 2580.396 -2113.083 1.2353 radius 3.0 3.0 3.0 sphere 0 stopped_in_car
jf @NONAME_892
Marker.Disable(3@)
03BD: destroy_sphere 4@
Player.CanMove($PLAYER_CHAR) = False
02A3: enable_widescreen 1
Camera.SetPosition(2571.298, -2131.141, 0.2417, 0.0, 0.0, 0.0)
Camera.PointAt(2553.847, -2131.96, 0.1888, 2)
5@ = Actor.Create(CivMale, #SPECIAL02, 2559.72, -2135.74, -0.0114)
Actor.Angle(5@) = 357.2468
6@ = Actor.Create(Gang1, #BALLAS1, 2559.714, -2133.241, 0.1261)
Actor.Angle(6@) = 183.6585
7@ = Actor.Create(Gang1, #BALLAS2, 2554.731, -2130.668, 0.2599)
Actor.Angle(7@) = 267.3192
8@ = Actor.Create(Gang1, #BALLAS3, 2554.995, -2130.374, 0.276)
Actor.Angle(8@) = 271.0067
01B2: give_actor 6@ weapon 29 ammo 1000 // Load the weapon model before using this
01B2: give_actor 7@ weapon 29 ammo 1000 // Load the weapon model before using this
01B2: give_actor 8@ weapon 29 ammo 1000 // Load the weapon model before using this
01B2: give_actor 5@ weapon 24 ammo 10 // Load the weapon model before using this
01B2: give_actor 5@ weapon 8 ammo 1 // Load the weapon model before using this
Actor.Armour(5@) = 100
0687: clear_actor 5@ task
0687: clear_actor 6@ task
Actor.Health(5@) = 200
01B9: set_actor 5@ armed_weapon_to 8
01B9: set_actor 6@ armed_weapon_to 29
01B9: set_actor 7@ armed_weapon_to 29
01B9: set_actor 8@ armed_weapon_to 29
081A: set_actor 5@ weapon_skill_to 0
0946: set_actor 5@ actions_uninterupted_by_weapon_fire 1
0946: set_actor 6@ actions_uninterupted_by_weapon_fire 1
0946: set_actor 7@ actions_uninterupted_by_weapon_fire 1
0946: set_actor 8@ actions_uninterupted_by_weapon_fire 1
087E: set_actor 5@ weapon_droppable 1
087E: set_actor 6@ weapon_droppable 1
087E: set_actor 7@ weapon_droppable 1
087E: set_actor 8@ weapon_droppable 1
0633: AS_actor $PLAYER_ACTOR exit_car
0605: actor 5@ perform_animation_sequence "PRTIAL_GNGTLKB" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1 // versionA
0605: actor 6@ perform_animation_sequence "PRTIAL_GNGTLKD" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1 // versionA
0632: release_group $PLAYER_GROUP
00BC: show_text_highpriority GXT 'IGIT' time 3000 flag 0
wait 2000
Player.CanMove($PLAYER_CHAR) = True
02A3: enable_widescreen 0
Camera.Restore_WithJumpCut
0633: AS_actor 1@ exit_car
05E2: AS_actor 1@ kill_actor 5@
0630: put_actor 5@ in_group 9@ as_leader
0631: put_actor 6@ in_group 9@
0631: put_actor 7@ in_group 9@
0631: put_actor 8@ in_group 9@
05E2: AS_actor 5@ kill_actor 1@
05E2: AS_actor 6@ kill_actor $PLAYER_ACTOR
05E2: AS_actor 7@ kill_actor $PLAYER_ACTOR
05E2: AS_actor 8@ kill_actor $PLAYER_ACTOR
10@ = Marker.CreateAboveActor(5@)
11@ = Marker.CreateAboveActor(6@)
12@ = Marker.CreateAboveActor(7@)
13@ = Marker.CreateAboveActor(8@)
Marker.SetColor(10@, 0)
Marker.SetColor(11@, 1073774847)
Marker.SetColor(12@, 1073774847)
Marker.SetColor(13@, 1073774847)

:NONAME_1614
wait 0
if or
 not Actor.Dead($PLAYER_ACTOR)
 not Actor.Dead(1@)
jf @FAIL
if and
 Actor.Dead(5@)
 Actor.Dead(6@)
 Actor.Dead(7@)
 Actor.Dead(8@)
jf @NONAME_1614
Marker.Disable(10@)
Marker.Disable(11@)
Marker.Disable(12@)
Marker.Disable(13@)
Actor.StorePos(5@, 14@, 15@, 16@)
17@ = Pickup.Create(1254, 3, 14@, 15@, 16@)
04C4: store_coords_to 30@ 31@ 32@ from_actor 5@ with_offset 0.0 -3.0 0.0
Camera.SetPosition(30@, 31@, 32@, 0.0, 0.0, 0.0)
Camera.PointAt(14@, 15@, 16@, 2)
0512: show_permanent_text_box 'CHBH'
03DC: 25@ = create_marker_above_pickup 17@
Marker.SetColor(25@, 0)

:NONAME_1819
wait 0
if or                                                          
 not Actor.Dead($PLAYER_ACTOR)
 not Actor.Dead(1@)
jf @FAIL
if
 Pickup.Picked_up(17@)
jf @NONAME_1819
03E6: remove_text_box
Pickup.Destroy(17@)
Pickup.Destroy(20@)
Pickup.Destroy(21@)
gosub @MISSION_PASSED
return

:MISSION_PASSED
0394: play_music 1
01E3: show_text_1number_styled GXT 'M_PASS' number 2000 time 5000 style 1  // MISSION PASSED!~n~~w~$~1~
Player.Money($PLAYER_CHAR) += 2000
$8301 = 1
return

:FAIL
gosub @MissionFailed
gosub @MissionCleanup
004E: end_thread

:MissionFailed
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1  // ~r~MISSION FAILED!
return

:MissionCleanup
04EF: release_animation "GANGS"
Model.Destroy(#NRG500) // I am not sure if this is needed, because of 00D8
Model.Destroy(#DESERT_EAGLE)
Model.Destroy(#MP5LNG)
Model.Destroy(#BALLAS1)
Model.Destroy(#BALLAS2)
Model.Destroy(#BALLAS3)
$ONMISSION = 0
00D8: mission_cleanup
return

Elsie93
  • Elsie93

    Player Hater

  • BUSTED!
  • Joined: 30 Mar 2012

#19

Posted 09 April 2012 - 08:11 AM

user posted imageYour mission has no end.

Gian_Yagami
  • Gian_Yagami

    Snitch

  • Members
  • Joined: 08 Nov 2011

#20

Posted 10 April 2012 - 09:22 AM

okay. I'll ask again later. I will be offline for a long time

Thanks everyone. happy.gif




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users