Napisano dnia: 2010-11-15 16:05:45
Witam napisałem sobie misję w pliku CM. Wygląda ona tak:
I oczywiście crash. Tym razem wlepiłem przykładowy kod Silenta i też crash.
Kod:
{$CLEO .cm}
thread 'KILLGUY'
$ONMISSION = 1
:Mission
0050: gosub @Mission_Start
if
0112: wasted_or_busted
then
0050: gosub @Mission_Failed
end
0050: gosub @Mission_Cleanup
$ONMISSION = 0
end_thread
:Mission_Start
Model.Load(285)
Model.Load(429)
:LoadModels
wait 0
if and
Model.Available(285)
Model.Available(429)
jf @LoadModels
00A5: $WOZ = create_car 429 at 2509.6826 -1671.296 13.0127
0175: set_car $WOZ Z_angle_to 343.6553
0161: $MARKER = create_marker_above_car $WOZ unknown 0 radar_mode 1
0165: set_marker $MARKER color_to 1
:czywozie
if
00DB: actor $PLAYER_CHAR in_car $WOZ
jf @czywozie
0164: disable_marker $MARKER
009A: $CEL = create_actor_pedtype 4 model 285 at 1532.6229 -1342.0984 328.252
0173: set_actor $CEL Z_angle_to 47.0729
0187: $MARKER2 = create_marker_above_actor $CEL
return
:check
wait 0
if
0118: actor $CEL dead
jf @check
gosub @Mission_Passed
return
:Mission_Cleanup
009B: destroy_actor $CEL
0164: disable_marker $MARKER2
00D8: mission_cleanup
return
:Mission_Failed
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1
return
:Mission_Passed
01E3: show_text_1number_styled GXT 'M_PASS' number 5000 time 5000 style 1
0109: player $PLAYER_CHAR money += 5000
0394: play_music 1
return
thread 'KILLGUY'
$ONMISSION = 1
:Mission
0050: gosub @Mission_Start
if
0112: wasted_or_busted
then
0050: gosub @Mission_Failed
end
0050: gosub @Mission_Cleanup
$ONMISSION = 0
end_thread
:Mission_Start
Model.Load(285)
Model.Load(429)
:LoadModels
wait 0
if and
Model.Available(285)
Model.Available(429)
jf @LoadModels
00A5: $WOZ = create_car 429 at 2509.6826 -1671.296 13.0127
0175: set_car $WOZ Z_angle_to 343.6553
0161: $MARKER = create_marker_above_car $WOZ unknown 0 radar_mode 1
0165: set_marker $MARKER color_to 1
:czywozie
if
00DB: actor $PLAYER_CHAR in_car $WOZ
jf @czywozie
0164: disable_marker $MARKER
009A: $CEL = create_actor_pedtype 4 model 285 at 1532.6229 -1342.0984 328.252
0173: set_actor $CEL Z_angle_to 47.0729
0187: $MARKER2 = create_marker_above_actor $CEL
return
:check
wait 0
if
0118: actor $CEL dead
jf @check
gosub @Mission_Passed
return
:Mission_Cleanup
009B: destroy_actor $CEL
0164: disable_marker $MARKER2
00D8: mission_cleanup
return
:Mission_Failed
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1
return
:Mission_Passed
01E3: show_text_1number_styled GXT 'M_PASS' number 5000 time 5000 style 1
0109: player $PLAYER_CHAR money += 5000
0394: play_music 1
return
I oczywiście crash. Tym razem wlepiłem przykładowy kod Silenta i też crash.