You are not logged in.
Pages: 1
Уважаемые форумчане, куда только не пихал код проверки, уничтожены ли машины, помер ли человек, результатов никакаких... Помогите пожалуйста! Вот код:
{$CLEO .cm}
:DASWORK
thread "DASWORK"
gosub @DASWORKStart
if
wasted_or_busted
then
gosub @DASWORKFailed
end
gosub @DASWORKCleanup
end_thread
:DASWORKStart
wait 0
Model.Load(#CELLPHONE)
0209: 0@ = random_int_in_ranges 409 415
0A01: model 0@ minimum_4wheels_vehicle
0209: 2@ = random_int_in_ranges 215 229
Model.Load(0@)
Model.Load(2@)
Model.Load(#TOWTRUCK)
Model.Load(#WMYMECH)
04ED: load_animation "CAR"
038B: load_requested_models
:DASWORK_1
wait 0
if and
Model.Available(#CELLPHONE)
Model.Available(0@)
Model.Available(2@)
Model.Available(#TOWTRUCK)
Model.Available(#WMYMECH)
04EE: animation "CAR" loaded
jf @DASWORK_1
player.CanMove($PLAYER_CHAR) = false
02A3: toggle_widescreen 1
0ACA: show_text_box "Phone rings..." time 1000
wait 3000
03E6: remove_text_box
0729: AS_actor $PLAYER_ACTOR hold_cellphone 1
wait 2000
0ACC:: show_text_lowpriority "Customer: Hello! My car broke down, could you please send me tow truck?" time 4000
wait 3000
0ACC:: show_text_lowhpriority "Carl Johnson: Hello! Yes, of course. The machine is on the way!" time 4000
wait 5000
0729: AS_actor $PLAYER_ACTOR hold_cellphone 0
02A3: toggle_widescreen 0
player.CanMove($PLAYER_CHAR) = true
Model.Destroy(#CELLPHONE)
jump @DASWORK_2
:DASWORK_2
0208: 8@ = random_float_in_ranges -1787.0 -2788.0
0208: 9@ = random_float_in_ranges -295.0 852.0
1@ = Car.Create(0@, 8@, 9@, 14.0)
Car.Angle(1@) = 2.1935
Car.Health(1@) = 300
car.DoorStatus(1@) = 2
073C: car 1@ damage_component 0 // versionB
0129: 3@ = create_actor_pedtype 23 model 2@ in_car 1@ driverseat
4@ = Marker.CreateAboveCar(1@)
5@ = Car.Create(#TOWTRUCK, -2051.2715, 166.986, 29.0386)
Car.Angle(5@) = 277.3283
jump @DASWORK_3
:DASWORK_3
03BC: 6@ = create_sphere_at -2051.0762 163.2181 28.8359 radius 5.0 5.0 5.0
7@ = Actor.Create(Mission1, #WMYMECH, -2039.898, 167.696, 28.8494)
Actor.Angle(7@) = 92.0251
0605: actor 7@ perform_animation_sequence "ROADCROSS" IFP_file "PED" 4.0 loop 1 0 0 0 time -1 // versionA
jump @DASWORK_4
:DASWORK_4
wait 0
if
0207: actor $PLAYER_ACTOR near_car 1@ radius 6.5 6.5 6.0 flag 0 in_car
jf @DASWORK_4
0893: put_trailer 1@ on_cab 5@
jump @DASWORK_5
:DASWORK_5
wait 0
if and
07AB: trailer 1@ attached_to_cab 5@
0103: actor $PLAYER_ACTOR in_sphere -2051.0762 163.2181 28.8359 radius 5.0 5.0 5.0 sphere 0 stopped_in_car
jf @DASWORK_4
07AC: detach_trailer 1@ from_cab 5@
02A3: toggle_widescreen 1
Car.DriveTo(5@, -2050.0681, 155.0392, 29.0477)
04BA: set_car 5@ speed_instantly 13.0
05CD: AS_actor $PLAYER_ACTOR exit_car 5@
05CD: AS_actor 3@ exit_car 1@
wait 1000
fade 0 3000
wait 3000
03BD: destroy_sphere 6@
Actor.PutAt(3@, -2046.5071, 162.3806, 28.8359)
0812: AS_actor 3@ perform_animation "IDLE_GANG1" IFP_file "PED" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB
Car.PutAt(1@, -2050.5708, 167.163, 28.9593)
Car.Angle(1@) = 274.585
0657: car 1@ open_componentA 0
wait 1000
Actor.PutAt($PLAYER_ACTOR, -2044.2552, 159.9058, 28.8359)
Actor.Angle($PLAYER_ACTOR) = 30.3929
0407: store_coords_to 31@ 32@ 33@ from_car 1@ with_offset 0.0 3.8 0.0
Actor.PutAt(7@, 31@, 32@, 33@)
wait 3000
fade 1 3000
Camera.SetPosition(-2040.7307, 179.5933, 28.8397, 1.0, 1.0, 1.0)
Camera.OnVehicle(1@, 15, 2)
wait 1000
0812: AS_actor 7@ perform_animation "SPANKING_IDLEP" IFP_file "SNM" 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1 // не работает...
wait 2000
Car.Health(1@) = 1000
wait 3000
0812: AS_actor 7@ perform_animation "CAR_CLOSE_LHS" IFP_file "PED" 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1 // не то...
068A: set_car 1@ repair_componentA 0
wait 10000
Camera.SetBehindPlayer($PLAYER_ACTOR)
wait 10000
camera.Restore_WithJumpCut
jump @DASWORKPassed
:DASWORKPassed
wait 500
Model.Destroy(0@)
Model.Destroy(2@)
Model.Destroy(#TOWTRUCK)
Model.Destroy(#WMYMECH)
Marker.Disable(4@)
01E3: text_1number_styled 'M_PASSD' 0 5000 ms 1 // MISSION PASSED!
0109: player $PLAYER_CHAR money += 10000
return
:DASWORKFailed
wait 500
Model.Destroy(0@)
Model.Destroy(2@)
Model.Destroy(#TOWTRUCK)
Model.Destroy(#WMYMECH)
Marker.Disable(4@)
00BA: text_styled 'M_FAIL' 5000 ms 1 // ~r~MISSION FAILED!
return
:DASWORKCleanup
$ONMISSION = 0 // integer values
mission_cleanup
return ю
Offline
jump @DASWORK_2 :DASWORK_2
П*******************************...
Сделай в цикле миссии провепку
:DASWORK_4 wait 0 if or KTO-TO CgOX TA4KA B3OPBAJIACb then return end А тут - то, что было...
А в основной конструкции миссии вот это
:DASWORK thread "DASWORK" gosub @DASWORKStart if or //здесь условия провала wasted_or_busted хтота здох тачила взорвалась then gosub @DASWORKFailed end gosub @DASWORKCleanup end_thread
Offline
Pages: 1