Napisano dnia: 2010-11-19 19:39:46
Witam mam 2 problemy(znowu). Zrobiłem kolejna misję i ustawiłem menu aby ładowało tę drugą. Jednak zamiast załadować tę drugą ładuje ciagle pierwszą nawet jak wybieram pozycje drugą. Kod:
2. Czemu ta misja nie działa?? Na moje oko powinna śmigać(użyłem zmiennych globalnych gdyż do ustawienia auta i gości w zupełności wystarczą.:
Kod:
{$VERSION 3.1.1000}
{$CLEO .cs}
//-------------MAIN---------------
0000: NOP
:petla1
wait 10
if
Player.Defined($PLAYER_CHAR)
jf @petla1
1@ = Marker.CreateIconAndSphere(22, 2525.714, -1703.988, 13.3803)
:petla3
wait 10
if
0102: actor $PLAYER_ACTOR in_sphere 2525.714 -1703.988 13.3803 radius 1.2 1.2 3.0 sphere 1 stopped_on_foot
jf @petla3
08D4: $Panel = create_panel_with_title 'TITLE' position 29.0 145.0 width 200.0 columns 1 interactive 1 background 1 alignment 1
08DB: set_panel $Panel column 0 header 'TITLE2' data 'M1' 'M2' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'
:czekaj_na_wybor
wait 0
if
00E1: player $PLAYER_CHAR pressed_key 15
jf @czekaj_na_wybor_test2
00E1: player $PLAYER_CHAR pressed_key 15
08DA: remove_panel $Panel
03E6: remove_text_box
Player.CanMove($PLAYER_CHAR) = True
jump @wyjdz
:czekaj_na_wybor_test2
if
00E1: player $PLAYER_CHAR pressed_key 16
jf @czekaj_na_wybor
00E1: player $PLAYER_CHAR pressed_key 15
08D7: $Wybrane = panel $Panel active_row
08DA: remove_panel $Panel
03E6: remove_text_box
:wybrane1
0A94: start_custom_mission "SAPLUS/1"
:wybrane2
0A94: start_custom_mission "SAPLUS/2"
:wyjdz
08DA: remove_panel $PANEL
03E6: remove_text_box
Player.CanMove($PLAYER_CHAR) = True
0A93: end_custom_thread
{$CLEO .cs}
//-------------MAIN---------------
0000: NOP
:petla1
wait 10
if
Player.Defined($PLAYER_CHAR)
jf @petla1
1@ = Marker.CreateIconAndSphere(22, 2525.714, -1703.988, 13.3803)
:petla3
wait 10
if
0102: actor $PLAYER_ACTOR in_sphere 2525.714 -1703.988 13.3803 radius 1.2 1.2 3.0 sphere 1 stopped_on_foot
jf @petla3
08D4: $Panel = create_panel_with_title 'TITLE' position 29.0 145.0 width 200.0 columns 1 interactive 1 background 1 alignment 1
08DB: set_panel $Panel column 0 header 'TITLE2' data 'M1' 'M2' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'
:czekaj_na_wybor
wait 0
if
00E1: player $PLAYER_CHAR pressed_key 15
jf @czekaj_na_wybor_test2
00E1: player $PLAYER_CHAR pressed_key 15
08DA: remove_panel $Panel
03E6: remove_text_box
Player.CanMove($PLAYER_CHAR) = True
jump @wyjdz
:czekaj_na_wybor_test2
if
00E1: player $PLAYER_CHAR pressed_key 16
jf @czekaj_na_wybor
00E1: player $PLAYER_CHAR pressed_key 15
08D7: $Wybrane = panel $Panel active_row
08DA: remove_panel $Panel
03E6: remove_text_box
:wybrane1
0A94: start_custom_mission "SAPLUS/1"
:wybrane2
0A94: start_custom_mission "SAPLUS/2"
:wyjdz
08DA: remove_panel $PANEL
03E6: remove_text_box
Player.CanMove($PLAYER_CHAR) = True
0A93: end_custom_thread
2. Czemu ta misja nie działa?? Na moje oko powinna śmigać(użyłem zmiennych globalnych gdyż do ustawienia auta i gości w zupełności wystarczą.:
Kod:
{$CLEO .cm}
thread 'MISSION'
$ONMISSION = 1
:Mission
0050: gosub @Mission_Start
if
0112: wasted_or_busted // mission only
then
0050: gosub @Mission_Failed
end
0050: gosub @Mission_Cleanup
$ONMISSION = 0
end_thread
:Mission_Start
Model.Load(#NRG500) //Auto
Model.Load(#BLADE) //Auto2
Model.Load(#SULTAN) //Auto3
Model.Load(#MALE01) //Ziomal
Model.Load(#WBDYG2) //Ziomal2
Model.Load(#WMYDRUG) //Ziomal3
:modele
Model.Available(#NRG500)
Model.Available(#BLADE)
Model.Available(#SULTAN)
Model.Available(#MALE01)
Model.Available(#WBDYG2)
Model.Available(#WMYDRUG)
jf @modele
02A7: 1@ = create_icon_marker_and_sphere 56 at 1858.4972 -1389.2042 13.5625
:czydojechal
wait 0
if
0103: actor $PLAYER_ACTOR in_sphere 1858.4972 -1389.2042 13.5623 radius 3.0 3.0 3.0 sphere 0 stopped_in_car
jf @czydojechal
fade 0 1500
wait 1500
00A5: $auto1 = create_car #NRG500 at 1865.4991 -1396.8075 13.1016
0175: set_car $auto1 Z_angle_to 273.5826
0186: $auto1m = create_marker_above_car $auto1
00A5: $auto2 = create_car #BLADE at 1866.0016 -1404.7622 13.1004
0175: set_car $auto2 Z_angle_to 92.4381
0186: $auto2m = create_marker_above_car $auto2
00A5: $auto3 = create_car #SULTAN at 1878.0234 -1408.7921 13.1924
0175: set_car $auto3 Z_angle_to 233.5123
0186: $auto3m = create_marker_above_car $auto3
wait 1500
fade 1 1500
:zniszone
wait 0
if
0119: car $auto1 wrecked
0119: car $auto2 wrecked
0119: car $auto3 wrecked
jf @zniszone
0164: disable_marker $auto1m
0164: disable_marker $auto2m
0164: disable_marker $auto3m
02A3: enable_widescreen 1
01B4: set_player $PLAYER_CHAR can_move 0
fade 0 1500
wait 1500
009A: $ziomek1 = create_actor_pedtype 4 model #MALE01 at 1837.3737 -1417.0337 13.5625
009A: $ziomek2 = create_actor_pedtype 4 model #WBDYG2 at 1838.9091 -1423.5222 13.5625
009A: $ziomek3 = create_actor_pedtype 4 model #WMYDRUG at 1837.4478 -1406.3287 13.5625
wait 1500
fade 1 1500
Camera.SetPosition(1860.8885, -1373.2102, 13.5625, 0.0, 0.0, 0.0)
0159: camera_on_ped $ziomek1 15 2
05D3: AS_actor $ziomek1 goto_point 1868.484 -1380.469 13.5125 mode 4 time 0 ms // versionA
05D3: AS_actor $ziomek2 goto_point 1868.484 -1380.469 13.5125 mode 4 time 0 ms
05D3: AS_actor $ziomek3 goto_point 1868.484 -1380.469 13.5125 mode 4 time 0 ms
:dobiegli
wait 0
if
00ED: actor $ziomek1 sphere 0 near_point 1868.484 -1380.469 13.5125 radius 4.0 4.0 on_foot
00ED: actor $ziomek2 sphere 0 near_point 1868.484 -1380.469 13.5125 radius 4.0 4.0 on_foot
00ED: actor $ziomek3 sphere 0 near_point 1868.484 -1380.469 13.5125 radius 4.0 4.0 on_foot
jf @dobiegli
fade 0 1500
wait 1500
015A: restore_camera
01B4: set_player $PLAYER_CHAR can_move 1
02A3: enable_widescreen 0
wait 1500
fade 1 1500
07A5: AS_actor $ziomek1 attack_actor $PLAYER_ACTOR 0 ms
07A5: AS_actor $ziomek2 attack_actor $PLAYER_ACTOR 0 ms
07A5: AS_actor $ziomek3 attack_actor $PLAYER_ACTOR 0 ms
02A7: 2@ = create_icon_marker_and_sphere 56 at 2510.4097 -1671.2052 13.4159
:uciekl
wait 0
if
0103: actor $PLAYER_ACTOR in_sphere 2510.4097 -1671.2052 13.4159 radius 3.0 3.0 3.0 sphere 0 stopped_in_car
jf @uciekl
gosub @Mission_Passed
return
return
:Mission_Cleanup
00A6: destroy_car $auto1
00A6: destroy_car $auto2
00A6: destroy_car $auto3
0164: disable_marker 2@
009B: destroy_actor $ziomek1
009B: destroy_actor $ziomek2
009B: destroy_actor $ziomek3
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 'MISSION'
$ONMISSION = 1
:Mission
0050: gosub @Mission_Start
if
0112: wasted_or_busted // mission only
then
0050: gosub @Mission_Failed
end
0050: gosub @Mission_Cleanup
$ONMISSION = 0
end_thread
:Mission_Start
Model.Load(#NRG500) //Auto
Model.Load(#BLADE) //Auto2
Model.Load(#SULTAN) //Auto3
Model.Load(#MALE01) //Ziomal
Model.Load(#WBDYG2) //Ziomal2
Model.Load(#WMYDRUG) //Ziomal3
:modele
Model.Available(#NRG500)
Model.Available(#BLADE)
Model.Available(#SULTAN)
Model.Available(#MALE01)
Model.Available(#WBDYG2)
Model.Available(#WMYDRUG)
jf @modele
02A7: 1@ = create_icon_marker_and_sphere 56 at 1858.4972 -1389.2042 13.5625
:czydojechal
wait 0
if
0103: actor $PLAYER_ACTOR in_sphere 1858.4972 -1389.2042 13.5623 radius 3.0 3.0 3.0 sphere 0 stopped_in_car
jf @czydojechal
fade 0 1500
wait 1500
00A5: $auto1 = create_car #NRG500 at 1865.4991 -1396.8075 13.1016
0175: set_car $auto1 Z_angle_to 273.5826
0186: $auto1m = create_marker_above_car $auto1
00A5: $auto2 = create_car #BLADE at 1866.0016 -1404.7622 13.1004
0175: set_car $auto2 Z_angle_to 92.4381
0186: $auto2m = create_marker_above_car $auto2
00A5: $auto3 = create_car #SULTAN at 1878.0234 -1408.7921 13.1924
0175: set_car $auto3 Z_angle_to 233.5123
0186: $auto3m = create_marker_above_car $auto3
wait 1500
fade 1 1500
:zniszone
wait 0
if
0119: car $auto1 wrecked
0119: car $auto2 wrecked
0119: car $auto3 wrecked
jf @zniszone
0164: disable_marker $auto1m
0164: disable_marker $auto2m
0164: disable_marker $auto3m
02A3: enable_widescreen 1
01B4: set_player $PLAYER_CHAR can_move 0
fade 0 1500
wait 1500
009A: $ziomek1 = create_actor_pedtype 4 model #MALE01 at 1837.3737 -1417.0337 13.5625
009A: $ziomek2 = create_actor_pedtype 4 model #WBDYG2 at 1838.9091 -1423.5222 13.5625
009A: $ziomek3 = create_actor_pedtype 4 model #WMYDRUG at 1837.4478 -1406.3287 13.5625
wait 1500
fade 1 1500
Camera.SetPosition(1860.8885, -1373.2102, 13.5625, 0.0, 0.0, 0.0)
0159: camera_on_ped $ziomek1 15 2
05D3: AS_actor $ziomek1 goto_point 1868.484 -1380.469 13.5125 mode 4 time 0 ms // versionA
05D3: AS_actor $ziomek2 goto_point 1868.484 -1380.469 13.5125 mode 4 time 0 ms
05D3: AS_actor $ziomek3 goto_point 1868.484 -1380.469 13.5125 mode 4 time 0 ms
:dobiegli
wait 0
if
00ED: actor $ziomek1 sphere 0 near_point 1868.484 -1380.469 13.5125 radius 4.0 4.0 on_foot
00ED: actor $ziomek2 sphere 0 near_point 1868.484 -1380.469 13.5125 radius 4.0 4.0 on_foot
00ED: actor $ziomek3 sphere 0 near_point 1868.484 -1380.469 13.5125 radius 4.0 4.0 on_foot
jf @dobiegli
fade 0 1500
wait 1500
015A: restore_camera
01B4: set_player $PLAYER_CHAR can_move 1
02A3: enable_widescreen 0
wait 1500
fade 1 1500
07A5: AS_actor $ziomek1 attack_actor $PLAYER_ACTOR 0 ms
07A5: AS_actor $ziomek2 attack_actor $PLAYER_ACTOR 0 ms
07A5: AS_actor $ziomek3 attack_actor $PLAYER_ACTOR 0 ms
02A7: 2@ = create_icon_marker_and_sphere 56 at 2510.4097 -1671.2052 13.4159
:uciekl
wait 0
if
0103: actor $PLAYER_ACTOR in_sphere 2510.4097 -1671.2052 13.4159 radius 3.0 3.0 3.0 sphere 0 stopped_in_car
jf @uciekl
gosub @Mission_Passed
return
return
:Mission_Cleanup
00A6: destroy_car $auto1
00A6: destroy_car $auto2
00A6: destroy_car $auto3
0164: disable_marker 2@
009B: destroy_actor $ziomek1
009B: destroy_actor $ziomek2
009B: destroy_actor $ziomek3
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