Quantcast

Jump to content

» «
Photo

Mission Crashes

1 reply to this topic
Pie015
  • Pie015

    6 STAR VETERAN

  • Members
  • Joined: 11 Jun 2010

#1

Posted 14 April 2013 - 07:14 PM

Hey guys, I don't know whats up with my mission but every time I enter the sphere, the game crashes, I looked in my script but couldn't find any error or mistake. Can you guys please help? A really untidy code I know.

CODE

{$CLEO .cs}

//------------MAIN------------
thread 'MISSION1'

:0
wait 0
if
Player.Defined($PLAYER_CHAR)
jf @0
0@ = Marker.CreateIconAndSphere(55, 1181.4739, -1362.6329, 14.1687)

:1
wait 0
if and
0102:   actor $PLAYER_ACTOR in_sphere 1181.4739 -1362.6329 14.1687 radius 2.0 2.0 2.0 sphere 0 stopped_on_foot
not Actor.Driving($PLAYER_ACTOR)
jf @1
Marker.Disable(0@)
Player.CanMove($PLAYER_ACTOR) = False
fade 0 1500
wait 2000
Actor.PutAt($PLAYER_ACTOR, 1183.8512, -1369.7137, 24.0105)
Actor.Angle($PLAYER_ACTOR) = 324.2892
wait 500
0110: clear_player $PLAYER_CHAR wanted_level
04EB: AS_actor $PLAYER_ACTOR crouch 1
1@ = Pickup.Create(1240, 15, 1179.2755, -1369.325, 23.9915)
2@ = Pickup.Create(1242, 15, 1178.4475, -1372.505, 23.9881)

:2
wait 0
Model.Load(#SNIPER)
Model.Load(#STRETCH)
Model.Load(#MP5LNG)
Model.Load(#COPCARLA)
Model.Load(#MAFBOSS)
Model.Load(#ARMY)
038B: load_requested_models

:3
wait 0
if or
not Model.Available(#SNIPER)
not Model.Available(#STRETCH)
not Model.Available(#MP5LNG)
not Model.Available(#COPCARLA)
not Model.Available(#MAFBOSS)
not Model.Available(#ARMY)
jf @4
wait 0
jump @3

:4
wait 0
01B2: give_actor $PLAYER_ACTOR weapon 34 ammo 150 // Load the weapon model before using this
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 34
0395: clear_area 1 at 1230.9407 -1281.4924 13.0865 radius 20.0
wait 1000
3@ = Car.Create(#STRETCH, 1230.9407, -1281.4924, 13.0865)
Car.Angle(3@) = 90.0
4@ = Car.Create(#COPCARLA, 1239.9238, -1281.2526, 13.0001)
Car.Angle(4@) = 90.0
5@ = Car.Create(#COPCARLA, 1222.7098, -1280.7329, 12.9619)
Car.Angle(5@) = 90.0
0129: 6@ = create_actor_pedtype 6 model #ARMY in_car 3@ driverseat
0129: 7@ = create_actor_pedtype 6 model #ARMY in_car 4@ driverseat
0129: 8@ = create_actor_pedtype 6 model #ARMY in_car 5@ driverseat
01C8: 9@ = create_actor_pedtype 6 model #ARMY in_car 4@ passenger_seat 0
01C8: 10@ = create_actor_pedtype 6 model #ARMY in_car 5@ passenger_seat 0
01C8: 11@ = create_actor_pedtype 4 model #MAFBOSS in_car 3@ passenger_seat 2
0350: set_actor 11@ maintain_position_when_attacked 1
12@ = Marker.CreateAboveActor(11@)
Marker.SetColor(12@, 0)
01B2: give_actor 6@ weapon 29 ammo 150 // Load the weapon model before using this
01B9: set_actor 6@ armed_weapon_to 29
01B2: give_actor 7@ weapon 29 ammo 150 // Load the weapon model before using this
01B9: set_actor 7@ armed_weapon_to 29
01B2: give_actor 8@ weapon 29 ammo 150 // Load the weapon model before using this
01B9: set_actor 8@ armed_weapon_to 29
01B2: give_actor 9@ weapon 29 ammo 150 // Load the weapon model before using this
01B9: set_actor 9@ armed_weapon_to 29
01B2: give_actor 10@ weapon 29 ammo 150 // Load the weapon model before using this
01B9: set_actor 10@ armed_weapon_to 29
01B2: give_actor 11@ weapon 29 ammo 150 // Load the weapon model before using this
01B9: set_actor 11@ armed_weapon_to 29
wait 500
fade 1 1500
Player.CanMove($PLAYER_CHAR) = True
05D1: AS_actor 8@ drive_car 5@ to 1197.2988 -1376.3077 12.8656 speed 25.0 0 model #NULL 0
07F8: car 3@ follow_car 5@ radius 5.0
07F8: car 4@ follow_car 3@ radius 5.0

:5
wait 0
if or
Actor.Dead($PLAYER_ACTOR)
0741:   actor $PLAYER_ACTOR busted
jf @6
wait 0
jump @MISFAIL

:6
wait 0
if
Actor.Dead(11@)
jf @5
wait 0

:MISPASS
wait 0
0394: play_music 1
01E3: show_text_1number_styled GXT 'M_PASS' number 10000 time 5000 style 1  // MISSION PASSED!~n~~w~$~1~
Player.Money($PLAYER_CHAR) += 10000
Pickup.Destroy(1@)
Pickup.Destroy(2@)
Car.RemoveReferences(3@)
Car.RemoveReferences(4@)
Car.RemoveReferences(5@)
Actor.RemoveReferences(6@)
Actor.RemoveReferences(7@)
Actor.RemoveReferences(8@)
Actor.RemoveReferences(9@)
Actor.RemoveReferences(10@)
Actor.RemoveReferences(11@)
Marker.Disable(12@)
0249: release_model #MP5LNG
0249: release_model #SNIPER
0249: release_model #ARMY
0249: release_model #STRETCH
0249: release_model #MAFBOSS
0249: release_model #COPCARLA
wait 1000
end_custom_thread

:MISFAIL
wait 0
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1
Pickup.Destroy(1@)
Pickup.Destroy(2@)
Car.RemoveReferences(3@)
Car.RemoveReferences(4@)
Car.RemoveReferences(5@)
Actor.RemoveReferences(6@)
Actor.RemoveReferences(7@)
Actor.RemoveReferences(8@)
Actor.RemoveReferences(9@)
Actor.RemoveReferences(10@)
Actor.RemoveReferences(11@)
Marker.Disable(12@)
0249: release_model #MP5LNG
0249: release_model #SNIPER
0249: release_model #ARMY
0249: release_model #STRETCH
0249: release_model #MAFBOSS
0249: release_model #COPCARLA
wait 1000
jump @0

ZAZ
  • ZAZ

    Kernlochbohrer

  • Members
  • Joined: 10 Jan 2005
  • European-Union

#2

Posted 14 April 2013 - 08:05 PM

this cause the crash:
CODE
Player.CanMove($PLAYER_ACTOR) = False


in addition do you have to write the code end_custom_thread with opcode
CODE
0A93: end_custom_thread
or did you insert it in your keywords.txt?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users