#1 Re: Вопросы по скриптингу » Один вопрос » 15-12-2013 10:38

А вот такой пример, в миссии создаются сразу несколько потоков:

:NONAME_5
03BC: $769 = create_sphere 369.444 -484.255 12.836 1.0 
03BC: $770 = create_sphere 367.767 -471.821 12.836 1.0 
03BC: $771 = create_sphere 360.833 -487.561 12.836 1.0 
03BC: $772 = create_sphere 369.002 -476.872 12.836 1.0 
03BC: $773 = create_sphere 377.34 -473.071 12.836 1.0 
03BC: $774 = create_sphere 380.841 -476.128 12.836 1.0 
create_thread @N1 
create_thread @N2 
create_thread @N3 
create_thread @P1 
create_thread @P2 
create_thread @C 
create_thread @NONAME_7 
create_thread @NONAME_8 
create_thread @K4 
end_thread 

:N1
thread 'N1' 
wait 200 
if 
00F8:   player $2 stopped 1 369.444 -484.255 12.836 radius 1.0 1.0 1.5 
else_jump @N1 
054C: use_GXT_table 'INTRO' 
00BC: text_highpriority 'INT1_B' 5000 ms 1  // Didn't think they'd ever let him out.
03BD: destroy_sphere $769 
end_thread 

:N2
thread 'N2' 
wait 200 
if 
00F8:   player $2 stopped 1 367.767 -471.821 12.836 radius 1.0 1.0 1.5 
else_jump @N2 
054C: use_GXT_table 'INTRO' 
00BC: text_highpriority 'INT1_B' 5000 ms 1  // Didn't think they'd ever let him out.
03BD: destroy_sphere $770 
end_thread 

:N3
thread 'N3' 
wait 200 
if 
00F8:   player $2 stopped 1 360.833 -487.561 12.836 radius 1.0 1.0 1.5 
else_jump @N3 
054C: use_GXT_table 'INTRO' 
00BC: text_highpriority 'INT1_B' 5000 ms 1  // Didn't think they'd ever let him out.
03BD: destroy_sphere $771 
$767 = 1 // integer values 
jump @K4_80

#2 Re: Вопросы по скриптингу » Один вопрос » 15-12-2013 10:00

Seemann, Не совсем понятно. Что значит до миссий? До потока 'MIS1'?

#3 Re: Вопросы по скриптингу » Один вопрос » 14-12-2013 17:13

Пробую создать миссию в васе, но уже есть странная проблема... Когда игра доходит до create_thread @PINCAR - вылетает ошибка... В чем может бы ть проблема? Раньше с таким не сталкивался.

//-------------Mission 1---------------

:MIS1
03A4: name_thread 'MIS1' 
0050: gosub @MIS1_57 
00D6: if 
0112:   wasted_or_busted 
004D: jump_if_false @MIS1_37 
0050: gosub @PINCAR_78 

:MIS1_37
0050: gosub @MIS1_46 
004E: end_thread 

:MIS1_46
0004: $1399 = 0 // integer values 
00D8: mission_cleanup 
0051: return 

:MIS1_57
0004: $1399 = 1 // integer values 
0247: request_model #PCJ600 
0247: request_model #BARRACKS 
0247: request_model #MAVERICK 
038B: load_requested_models 
0001: wait 100 ms 
00D6: if or
0248:   model #PCJ600 available 
0248:   model #BARRACKS available 
0248:   model #MAVERICK available 
004D: jump_if_false @MIS1_57 
00A5: $2140 = create_car #PCJ600 at 305.4366 267.688 16.2197 
0186: $2139 = create_marker_above_car $2140 
0229: set_car $2140 color_to 1 1 
016A: fade 1 2000 ms 
0001: wait 2000 ms 
[b]004F: create_thread @PINCAR [/b] 

:MIS1_171
0001: wait 1000 ms 
02A7: $223 = create_icon_marker_and_sphere 23 at 310.1116 304.3421 18.0921 
0002: jump @MIS1_171 

:PINCAR
03A4: name_thread 'PINCAR' 

:PINCAR_10
0001: wait 0 ms 
00D6: if 
0442:   player $2 in_car $2140 
004D: jump_if_false @PINCAR_10 
0164: disable_marker $2139 

:PINCAR_38
0001: wait 0 ms 
00D6: if 
8442:   not player $2 in_car $2140 
004D: jump_if_false @PINCAR_38 
0186: $2139 = create_marker_above_car $2140 
0002: jump @PINCAR_10 
004E: end_thread 

:PINCAR_78
0001: wait 99999999 ms 
004E: end_thread

Board footer

Powered by FluxBB