You are not logged in.
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007 {$VERSION 3.1.0027} {$CLEO .cs} //-------------MAIN--------------- 0000: NOP wait 10 :Fire if 0AB0: key_pressed 20 jf @Fire wait 100 05BC: AS_actor $PLAYER_ACTOR fire 0
Почему скрипт декомпилированный?
Не надо каждый раз декомпилировать его, используй txt-исходник.
И в конце должно быть или 0A93: end_custom_thread , если ты хочешь завершить скрипт, или jump @Fire
И в циклах у тебя должно быть wait 0 - где он?
Вот статья, поясняющая, для чего нужен wait
Вариант 1:
{$CLEO}
0000: NOP
wait 10
:Fire
wait 0
if
0AB0: key_pressed 20
jf @Fire
wait 100
05BC: AS_actor $PLAYER_ACTOR fire 0
jump @FireВариант 2:
{$CLEO}
0000: NOP
while true
wait 0
if 0AB0: key_pressed 20
then
wait 100
05BC: AS_actor $PLAYER_ACTOR fire 0
end
end
Это называется много. На GTAModding, GTAMaps и AG активных людей-скриптеров ещё меньше.
Правда, тут только все всё на SA, а IV и правда пусто.
А, оказывается, у тебя уже есть 00AE:.
Попробуй ещё в опкоде 05D1: поставить последний параметр 2 вместо 0:
05D1: AS_actor 4@ drive_car 3@ to -125.807 -1202.0946 2.6953 speed 25.0 0 model #NULL 2
А в 0713 поставить firing_rate 100:
0713: actor 0@ driveby_actor 2@ car -1 point 0.0 0.0 0.0 radius 5000.0 4 1 firing_rate 100 0713: actor 2@ driveby_actor 0@ car -1 point 0.0 0.0 0.0 radius 5000.0 4 1 firing_rate 100
(Можно это ещё сделать через decision makers)
Чтоб стреляли очередями, нужно прописать:
07DD: set_actor 1@ temper_to 100 // see pedstats.dat
Чтоб машина не останавливалась на светофорах и объезжала другие машины, нужно поставить:
00AE: set_car 0@ traffic_behaviour_to 2
А как же Ammy?
Поздравляю!
Компоненты для работы с IMG, RPF, WTD для Delphi.
Для GTAArchives нужен Delphi ZLib (включен в архив)
Для WTDReader.pas требуется компонент VampyreImagingLibrary.
Spiro - программа, основанная на этих компонентах. (Пример возможностей редактирования RPF2)
-----------
Добавлено:
Эти компоненты нужны для Delphi-программистов, с их помощью они могут написать например редактор IMG3, RPF2, просмотрщик WTD, визуальный анимированный редактор loadingscreens_pc.dat, автоматический установщик модов, машин и оружия и многое другое, зависит от фантазии программиста.
Скачать GTAComponents
Скачать пример работы с IMG3
Скачать Spiro - пример работы с RPF2
Скачать пример работы с WTD
Для открытия примеров в Delphi требуются компоненты SynEdit 2.0.3 и VampyreImagingLibrary 0.26.0 и ZLibEx (включен в архив GTAArchives) и GLScene
Вообще-то 0092 это Trunc, а не Floor.
число 0092 trunc ceil floor round 0.6 0 0 1 0 1 0.4 0 0 1 0 0 -1.6 -1 -1 -1 -2 -2 -1.4 -1 -1 -1 -2 -1 -1.0 -1 -1 -1 -1 -1
0x70CE30 BOOL __cdecl WorldCoords2ScreenCoords(RwV3D *inPoint, RwV3D *outpoint, float *x, float *y, char, char)
[large]↗[/large]
Несколько лет назад я пытался использовать эту функцию, но она выдаёт какие-то неправильные координаты:
{$CLEO}
{$I stdconsts.txt}
var
$Player_Actor: Actor
1@: Actor
end
wait 2000
:begin
while true
if and
00E1: player 0 pressed_key 6
not $Player_Actor.Driving
then
if 856D: not actor 1@ defined
then
0AB1: call_scm_func @GetTargetPed 0 1@
end
if 056D: actor 1@ defined
then
03F0: enable_text_draw 1
081C: draw_text_outline 1 RGBA 0 0 0 255
0342: enable_text_draw_centered 1
04C4: store_coords_to 4@ 5@ 6@ from_actor 1@ with_offset 0.0 0.0 0.0
0226: 2@ = actor 1@ health
//0AB1: call_scm_func @WorldCoords2ScreenCoords 3 4@ 5@ 6@ to 7@ 8@
0AB1: call_scm_func @__VarToOffset 1 varnum 4 store_to 18@
0AB1: call_scm_func @__VarToOffset 1 varnum 13 store_to 19@
0AB1: call_scm_func @__VarToOffset 1 varnum 7 store_to 20@
0AB1: call_scm_func @__VarToOffset 1 varnum 8 store_to 21@
0AA5: call 0x70CE30 num_params 6 pop 6 1 1 21@ 20@ 19@ 18@
045A: draw_text_1number 7@ 8@ GXT 'DOLLAR' number 2@ // $~1~
end
end
wait 0
end
:__VarToOffset
0A9F: 1@ = current_thread_pointer
1@ += 0x3C
0@ *= 4
005A: 1@ += 0@ // address of the local variable
0AB2: ret 1 1@
:GetTargetPed{out_HPed}
{0@ = 300694
0085: 0@ = &0(0@,1i)}
0A8D: 0@ = read_memory 0xB6F3B8 size 4 virtual_protect 0
inc(0@, 0x79C)
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
if 0@ > 0
then
0A8D: 8@ = read_memory 0x00B74490 size 4 virtual_protect 0
0AA8: call_function_method 0x4442D0 struct 8@ num_params 1 pop 0 0@ 1@
if
056D: actor 1@ defined
then
0AB2: ret 1 1@
end
end
0AB2: ret 1 -1А вот этот скрипт, о котором упоминал GTASA вообще не использует эту функцию и работает:
// This file was decompiled using SASCM.INI published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007
{$VERSION 3.1.0027}
{$CLEO .cs}
//-------------MAIN---------------
03A4: name_thread 'PHOTO'
:PHOTO_11
0001: wait 0 ms
0A96: 0@ = actor $PLAYER_ACTOR struct
000A: 0@ += 1320
0A8D: 0@ = read_memory 0@ size 1 virtual_protect 0
0A8D: 1@ = read_memory 0xB7CB64 size 4 virtual_protect 0
00D6: if and
02D8: actor $PLAYER_ACTOR current_weapon == 43
0256: player $PLAYER_CHAR defined
08B7: test 0@ bit 4
0023: 0.01 > 1@
004D: jump_if_false @PHOTO_11
00BA: show_text_styled GXT 'DUMMY' time 1000 style 7
068D: get_camera_position_to 18@ 19@ 20@
068D: get_camera_position_to 21@ 22@ 23@
068E: get_camera_target_point_to 24@ 25@ 26@
0801: get_camera_zoom_factor_to 27@ // float
0A8D: 3@ = read_memory 0xC3EFA4 size 4 virtual_protect 0
0013: 3@ *= 0.75
:PHOTO_175
0001: wait 0 ms
0A8D: 2@ = read_memory 0xB7CB64 size 4 virtual_protect 0
00D6: if
0021: 2@ > 0.1
004D: jump_if_false @PHOTO_175
00D6: if
8248: not model #CAMERA available
004D: jump_if_false @PHOTO_257
0247: load_model #CAMERA
038B: load_requested_models
:PHOTO_237
0001: wait 0 ms
00D6: if
0248: model #CAMERA available
004D: jump_if_false @PHOTO_237
:PHOTO_257
0A96: 4@ = actor $PLAYER_ACTOR struct
000A: 4@ += 20
0A8D: 4@ = read_memory 4@ size 4 virtual_protect 0
000A: 4@ += 56
0A8D: 17@ = read_memory 4@ size 4 virtual_protect 0
000B: 17@ += -1.5
0A8C: write_memory 4@ size 4 value 17@ virtual_protect 0
000B: 17@ += 1.5
0107: 4@ = create_object #CAMERA at 0.0 0.0 0.0
0382: set_object 4@ collision_detection 0
0550: keep_object 4@ in_memory 1
0750: set_object 4@ visibility 0
015F: set_camera_position 21@ 22@ 23@ rotation 0.0 0.0 0.0
0160: set_camera_point_at 24@ 25@ 26@ mode 2
0922: set_camera_zoom_in_factor 27@ out_factor 27@ timelimit 40 mode 1
0063: 24@ -= 21@ // (float)
0063: 25@ -= 22@ // (float)
0063: 26@ -= 23@ // (float)
050A: 30@ = distance_between_XYZ 24@ 25@ 26@ and_XYZ 0.0 0.0 0.0
0073: 24@ /= 30@ // (float)
0073: 25@ /= 30@ // (float)
0073: 26@ /= 30@ // (float)
0087: 28@ = 24@ // (float)
0087: 29@ = 25@ // (float)
0050: gosub @PHOTO_8974
0087: 23@ = 27@ // (float)
0087: 28@ = 26@ // (float)
0509: 29@ = distance_between_XY 24@ 25@ and_XY 0.0 0.0
0050: gosub @PHOTO_8974
0087: 21@ = 27@ // (float)
0453: set_object 4@ XY_rotation 21@ 23@ angle 0.0
015D: set_gamespeed 0.0
03F0: enable_text_draw 1
0A8D: 1@ = read_memory 0xB610E0 size 4 virtual_protect 0
:PHOTO_623
0001: wait 0 ms
0A8D: 0@ = read_memory 0xB610E0 size 4 virtual_protect 0
0062: 0@ -= 1@ // (int)
0016: 0@ /= 250
00D6: if
001B: 11 > 0@
004D: jump_if_false @PHOTO_682
0006: 16@ = 0
:PHOTO_682
0871: init_jump_table 0@ total_jumps 12 default_jump 0 @PHOTO_6640 jumps 0 @PHOTO_623 1 @PHOTO_623 2 @PHOTO_5872 3 @PHOTO_5140 4 @PHOTO_2511 5 @PHOTO_1899 6 @PHOTO_1299
0872: jump_table_jumps 7 @PHOTO_810 8 @PHOTO_810 9 @PHOTO_810 10 @PHOTO_810 11 @PHOTO_6640 -1 @PHOTO_5872 -1 @PHOTO_5872 -1 @PHOTO_5872 -1 @PHOTO_5872
:PHOTO_810
0006: 6@ = 0
0006: 0@ = 0xB71F80
0006: 30@ = 0
:PHOTO_834
0A8D: 21@ = read_memory 0@ size 2 virtual_protect 0
00D6: if
0039: 21@ == 20
004D: jump_if_false @PHOTO_878
000A: 0@ += 40
0002: jump @PHOTO_1205
:PHOTO_878
000A: 0@ += 4
0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 4
0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 4
0A8D: 23@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 16
0A8D: 5@ = read_memory 0@ size 4 virtual_protect 0
006B: 5@ *= 5@ // (float)
000B: 5@ += 0.5
0092: 5@ = float 5@ to_integer
0012: 5@ *= 5
000A: 0@ += 12
000B: 23@ += 0.1
00D6: if
86BD: not no_obstacles_between 21@ 22@ 23@ and 18@ 19@ 20@ solid 1 car 0 actor 0 object 0 particle 0
004D: jump_if_false @PHOTO_1052
0002: jump @PHOTO_1205
:PHOTO_1052
000B: 23@ += -0.1
0050: gosub @PHOTO_8734
00D6: if or
0023: 0.0 > 24@
0021: 24@ > 640.0
0023: 0.0 > 25@
0021: 25@ > 448.0
0023: 0.0 > 26@
004D: jump_if_false @PHOTO_1137
0002: jump @PHOTO_1205
:PHOTO_1137
0050: gosub @PHOTO_8699
033F: set_text_draw_letter_size 0.275 1.1
0340: set_text_draw_RGBA 255 128 0 255
045A: draw_text_1number 24@ 25@ GXT 'DOLLAR' number 5@ // $~1~
005A: 16@ += 5@ // (int)
005A: 6@ += 5@ // (int)
:PHOTO_1205
000A: 30@ += 1
0019: 30@ > 59
004D: jump_if_false @PHOTO_834
0050: gosub @PHOTO_8699
03E4: enable_text_draw_align_right 1
081C: draw_text_outline 2 RGBA 0 0 0 255
033F: set_text_draw_letter_size 0.55 2.2
0340: set_text_draw_RGBA 255 128 0 255
045A: draw_text_1number 608.0 280.0 GXT 'DOLLAR' number 6@ // $~1~
:PHOTO_1299
0006: 6@ = 0
0006: 0@ = 13092680
0006: 30@ = 0
:PHOTO_1323
000A: 0@ += 24
0A8D: 21@ = read_memory 0@ size 1 virtual_protect 0
00D6: if
0039: 21@ == 0
004D: jump_if_false @PHOTO_1374
000A: 0@ += 20
0002: jump @PHOTO_1805
:PHOTO_1374
000A: 0@ += 4
0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 4
0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0
0A8D: 23@ = read_memory 0xB7CB84 size 4 virtual_protect 0
0085: 5@ = 21@ // (int)
005A: 5@ += 22@ // (int)
00D6: if or
001D: 23@ > 5@ // (int)
001D: 21@ > 23@ // (int)
004D: jump_if_false @PHOTO_1483
000A: 0@ += 12
0002: jump @PHOTO_1805
:PHOTO_1483
0062: 5@ -= 23@ // (int)
0093: 22@ = integer 22@ to_float
0093: 5@ = integer 5@ to_float
0073: 5@ /= 22@ // (float)
0013: 5@ *= 20.0
000B: 5@ += 0.5
0092: 5@ = float 5@ to_integer
0012: 5@ *= 5
000A: 0@ += -20
0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 4
0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 4
0A8D: 23@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 24
00D6: if
86BD: not no_obstacles_between 21@ 22@ 23@ and 18@ 19@ 20@ solid 1 car 0 actor 0 object 0 particle 0
004D: jump_if_false @PHOTO_1662
0002: jump @PHOTO_1805
:PHOTO_1662
0050: gosub @PHOTO_8734
00D6: if or
0023: 0.0 > 24@
0021: 24@ > 640.0
0023: 0.0 > 25@
0021: 25@ > 448.0
0023: 0.0 > 26@
004D: jump_if_false @PHOTO_1737
0002: jump @PHOTO_1805
:PHOTO_1737
0050: gosub @PHOTO_8699
033F: set_text_draw_letter_size 0.34375 1.375
0340: set_text_draw_RGBA 255 255 0 255
045A: draw_text_1number 24@ 25@ GXT 'DOLLAR' number 5@ // $~1~
005A: 16@ += 5@ // (int)
005A: 6@ += 5@ // (int)
:PHOTO_1805
000A: 30@ += 1
0019: 30@ > 15
004D: jump_if_false @PHOTO_1323
0050: gosub @PHOTO_8699
03E4: enable_text_draw_align_right 1
081C: draw_text_outline 2 RGBA 0 0 0 255
033F: set_text_draw_letter_size 0.55 2.2
0340: set_text_draw_RGBA 255 255 0 255
045A: draw_text_1number 608.0 252.0 GXT 'DOLLAR' number 6@ // $~1~
:PHOTO_1899
0006: 6@ = 0
0006: 0@ = 13144488
0006: 30@ = 0
:PHOTO_1923
000A: 0@ += 16
0A8D: 21@ = read_memory 0@ size 1 virtual_protect 0
00D6: if
0039: 21@ == 0
004D: jump_if_false @PHOTO_1974
000A: 0@ += 20
0002: jump @PHOTO_2417
:PHOTO_1974
000A: 0@ += 4
0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 4
0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 4
0A8D: 23@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += -28
0A8D: 5@ = read_memory 0@ size 4 virtual_protect 0
00D6: if or
0039: 5@ == 16
0039: 5@ == 18
004D: jump_if_false @PHOTO_2083
0006: 5@ = 500
:PHOTO_2083
00D6: if or
0039: 5@ == 17
0039: 5@ == 58
004D: jump_if_false @PHOTO_2116
0006: 5@ = 250
:PHOTO_2116
00D6: if
0039: 5@ == 39
004D: jump_if_false @PHOTO_2142
0006: 5@ = 750
:PHOTO_2142
00D6: if
0039: 5@ == 19
004D: jump_if_false @PHOTO_2168
0006: 5@ = 1000
:PHOTO_2168
00D6: if
0039: 5@ == 20
004D: jump_if_false @PHOTO_2194
0006: 5@ = 1500
:PHOTO_2194
000A: 0@ += 36
00D6: if
001B: 100 > 5@
004D: jump_if_false @PHOTO_2226
0002: jump @PHOTO_2417
:PHOTO_2226
00D6: if
86BD: not no_obstacles_between 21@ 22@ 23@ and 18@ 19@ 20@ solid 1 car 0 actor 0 object 0 particle 0
004D: jump_if_false @PHOTO_2274
0002: jump @PHOTO_2417
:PHOTO_2274
0050: gosub @PHOTO_8734
00D6: if or
0023: 0.0 > 24@
0021: 24@ > 640.0
0023: 0.0 > 25@
0021: 25@ > 448.0
0023: 0.0 > 26@
004D: jump_if_false @PHOTO_2349
0002: jump @PHOTO_2417
:PHOTO_2349
0050: gosub @PHOTO_8699
033F: set_text_draw_letter_size 0.4125 1.65
0340: set_text_draw_RGBA 0 255 128 255
045A: draw_text_1number 24@ 25@ GXT 'DOLLAR' number 5@ // $~1~
005A: 16@ += 5@ // (int)
005A: 6@ += 5@ // (int)
:PHOTO_2417
000A: 30@ += 1
0019: 30@ > 31
004D: jump_if_false @PHOTO_1923
0050: gosub @PHOTO_8699
03E4: enable_text_draw_align_right 1
081C: draw_text_outline 2 RGBA 0 0 0 255
033F: set_text_draw_letter_size 0.55 2.2
0340: set_text_draw_RGBA 0 255 128 255
045A: draw_text_1number 608.0 224.0 GXT 'DOLLAR' number 6@ // $~1~
:PHOTO_2511
0006: 6@ = 0
0A8D: 0@ = read_memory 0xB74490 size 4 virtual_protect 0
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
0A8D: 31@ = read_memory 0xB74490 size 4 virtual_protect 0
000A: 31@ += 4
0A8D: 31@ = read_memory 31@ size 4 virtual_protect 0
0006: 30@ = 0
:PHOTO_2584
0A8D: 21@ = read_memory 31@ size 1 virtual_protect 0
000A: 31@ += 1
00D6: if or
001B: 0 > 21@
0019: 21@ > 127
004D: jump_if_false @PHOTO_2643
000A: 0@ += 1988
0002: jump @PHOTO_5045
:PHOTO_2643
0085: 23@ = 30@ // (int)
0012: 23@ *= 256
005A: 23@ += 21@ // (int)
00D6: if
003C: $PLAYER_ACTOR == 23@ // (int)
004D: jump_if_false @PHOTO_2701
000A: 0@ += 1988
0002: jump @PHOTO_5045
:PHOTO_2701
000A: 0@ += 1344
0A8D: 5@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 4
0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0
0073: 5@ /= 21@ // (float)
0013: 5@ *= -1.0
000B: 5@ += 2.0
0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0
006B: 5@ *= 21@ // (float)
0017: 5@ /= 10.0
000A: 0@ += 468
0A8D: 21@ = read_memory 0@ size 1 virtual_protect 0
0007: 22@ = 0.0
00D6: if or
0039: 21@ == 1
0039: 21@ == 9
0039: 21@ == 10
0039: 21@ == 12
004D: jump_if_false @PHOTO_2877
0007: 22@ = 5.0
:PHOTO_2877
00D6: if
0039: 21@ == 2
004D: jump_if_false @PHOTO_2905
0007: 22@ = 15.0
:PHOTO_2905
00D6: if or
0039: 21@ == 3
0039: 21@ == 4
004D: jump_if_false @PHOTO_2940
0007: 22@ = 20.0
:PHOTO_2940
00D6: if or
0039: 21@ == 5
0039: 21@ == 6
0039: 21@ == 8
004D: jump_if_false @PHOTO_2982
0007: 22@ = 25.0
:PHOTO_2982
00D6: if
0039: 21@ == 7
004D: jump_if_false @PHOTO_3010
0007: 22@ = 75.0
:PHOTO_3010
000A: 0@ += -496
0A8D: 21@ = read_memory 0@ size 1 virtual_protect 0
00D6: if
0019: 21@ > 3
004D: jump_if_false @PHOTO_3058
0013: 22@ *= 2.0
:PHOTO_3058
000A: 0@ += -36
0A8D: 21@ = read_memory 0@ size 2 virtual_protect 0
000A: 0@ += -1216
00D6: if and
0019: 21@ > 0
001B: 10001 > 21@
004D: jump_if_false @PHOTO_3147
0093: 21@ = integer 21@ to_float
0013: 21@ *= 0.0003
000B: 21@ += 2.0
006B: 22@ *= 21@ // (float)
:PHOTO_3147
005B: 5@ += 22@ // (float)
0007: 22@ = 0.0
0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0
006B: 21@ *= 21@ // (float)
005B: 22@ += 21@ // (float)
000A: 0@ += 4
0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0
006B: 21@ *= 21@ // (float)
005B: 22@ += 21@ // (float)
000A: 0@ += 4
0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0
006B: 21@ *= 21@ // (float)
005B: 22@ += 21@ // (float)
000A: 0@ += 1912
0013: 22@ *= 1000.0
005B: 5@ += 22@ // (float)
00D6: if or
0611: actor 23@ performing_animation "BIKE_fallR"
0611: actor 23@ performing_animation "BIKE_fall_off"
0611: actor 23@ performing_animation "CAR_jackedLHS"
0611: actor 23@ performing_animation "CAR_jackedRHS"
0611: actor 23@ performing_animation "CAR_Qjacked"
0611: actor 23@ performing_animation "cower"
0611: actor 23@ performing_animation "DUCK_cower"
0611: actor 23@ performing_animation "EV_step"
0611: actor 23@ performing_animation "gas_cwr"
004D: jump_if_false @PHOTO_3462
000B: 5@ += 25.0
:PHOTO_3462
00D6: if or
0611: actor 23@ performing_animation "abseil"
0611: actor 23@ performing_animation "CAR_pulloutL_LHS"
0611: actor 23@ performing_animation "CAR_pulloutL_RHS"
0611: actor 23@ performing_animation "CAR_pullout_LHS"
0611: actor 23@ performing_animation "CAR_pullout_RHS"
0611: actor 23@ performing_animation "Crouch_Roll_L"
0611: actor 23@ performing_animation "Crouch_Roll_R"
0611: actor 23@ performing_animation "FALL_skyDive"
0611: actor 23@ performing_animation "handscower"
004D: jump_if_false @PHOTO_3662
000B: 5@ += 25.0
:PHOTO_3662
00D6: if or
0611: actor 23@ performing_animation "CAR_crawloutRHS"
0611: actor 23@ performing_animation "CAR_rollout_LHS"
0611: actor 23@ performing_animation "CAR_rollout_RHS"
0611: actor 23@ performing_animation "EV_dive"
0611: actor 23@ performing_animation "FALL_back"
0611: actor 23@ performing_animation "FALL_fall"
0611: actor 23@ performing_animation "FALL_front"
0611: actor 23@ performing_animation "handscower"
0611: actor 23@ performing_animation "handsup"
004D: jump_if_false @PHOTO_3843
000B: 5@ += 50.0
:PHOTO_3843
00D6: if or
0611: actor 23@ performing_animation "CLIMB_jump"
0611: actor 23@ performing_animation "CLIMB_jump_B"
0611: actor 23@ performing_animation "CLIMB_Pull"
0611: actor 23@ performing_animation "CLIMB_Stand"
0611: actor 23@ performing_animation "FALL_glide"
0611: actor 23@ performing_animation "JUMP_glide"
004D: jump_if_false @PHOTO_3969
000B: 5@ += 10.0
:PHOTO_3969
00D6: if or
0611: actor 23@ performing_animation "DAM_armL_frmBK"
0611: actor 23@ performing_animation "DAM_armL_frmFT"
0611: actor 23@ performing_animation "DAM_armL_frmLT"
0611: actor 23@ performing_animation "DAM_armR_frmBK"
0611: actor 23@ performing_animation "DAM_armR_frmFT"
0611: actor 23@ performing_animation "DAM_armR_frmRT"
0611: actor 23@ performing_animation "DAM_LegL_frmBK"
0611: actor 23@ performing_animation "DAM_LegL_frmFT"
0611: actor 23@ performing_animation "DAM_LegL_frmLT"
004D: jump_if_false @PHOTO_4179
000B: 5@ += 50.0
:PHOTO_4179
00D6: if or
0611: actor 23@ performing_animation "DAM_LegR_frmBK"
0611: actor 23@ performing_animation "DAM_LegR_frmFT"
0611: actor 23@ performing_animation "DAM_LegR_frmRT"
0611: actor 23@ performing_animation "DAM_stomach_frmBK"
0611: actor 23@ performing_animation "DAM_stomach_frmFT"
0611: actor 23@ performing_animation "DAM_stomach_frmLT"
0611: actor 23@ performing_animation "DAM_stomach_frmRT"
0611: actor 23@ performing_animation "LRGIRL_IDLE_TO_L0"
0611: actor 23@ performing_animation "LRGIRL_IDLE_TO_L0"
004D: jump_if_false @PHOTO_4407
000B: 5@ += 50.0
:PHOTO_4407
00D6: if or
0611: actor 23@ performing_animation "HitA_1"
0611: actor 23@ performing_animation "HitA_2"
0611: actor 23@ performing_animation "HitA_3"
0611: actor 23@ performing_animation "HIT_back"
0611: actor 23@ performing_animation "HIT_behind"
0611: actor 23@ performing_animation "HIT_front"
0611: actor 23@ performing_animation "HIT_GUN_BUTT"
0611: actor 23@ performing_animation "HIT_L"
0611: actor 23@ performing_animation "HIT_R"
004D: jump_if_false @PHOTO_4558
000B: 5@ += 25.0
:PHOTO_4558
00D6: if or
0611: actor 23@ performing_animation "Drown"
0611: actor 23@ performing_animation "KO_shot_face"
0611: actor 23@ performing_animation "KO_shot_front"
0611: actor 23@ performing_animation "KO_shot_stom"
0611: actor 23@ performing_animation "KO_skid_back"
0611: actor 23@ performing_animation "KO_skid_front"
0611: actor 23@ performing_animation "KO_spin_L"
0611: actor 23@ performing_animation "KO_spin_R"
004D: jump_if_false @PHOTO_4720
000B: 5@ += 75.0
:PHOTO_4720
00D6: if
09A8: actor 23@ headshoted
004D: jump_if_false @PHOTO_4746
000B: 5@ += 75.0
:PHOTO_4746
00D6: if and
8184: not actor 23@ health >= 1
8118: not actor 23@ dead
004D: jump_if_false @PHOTO_4779
000B: 5@ += 100.0
:PHOTO_4779
00D6: if
0118: actor 23@ dead
004D: jump_if_false @PHOTO_4805
000B: 5@ += 50.0
:PHOTO_4805
00A0: store_actor 23@ position_to 21@ 22@ 23@
00D6: if
86BD: not no_obstacles_between 21@ 22@ 23@ and 18@ 19@ 20@ solid 1 car 0 actor 0 object 0 particle 0
004D: jump_if_false @PHOTO_4867
0002: jump @PHOTO_5045
:PHOTO_4867
0050: gosub @PHOTO_8734
00D6: if or
0023: 0.0 > 24@
0021: 24@ > 640.0
0023: 0.0 > 25@
0021: 25@ > 448.0
0023: 0.0 > 26@
004D: jump_if_false @PHOTO_4942
0002: jump @PHOTO_5045
:PHOTO_4942
0013: 5@ *= 0.2
000B: 5@ += 0.5
0092: 5@ = float 5@ to_integer
0012: 5@ *= 5
0050: gosub @PHOTO_8699
033F: set_text_draw_letter_size 0.4125 1.65
0340: set_text_draw_RGBA 0 128 255 255
045A: draw_text_1number 24@ 25@ GXT 'DOLLAR' number 5@ // $~1~
005A: 16@ += 5@ // (int)
005A: 6@ += 5@ // (int)
:PHOTO_5045
000A: 30@ += 1
0019: 30@ > 139
004D: jump_if_false @PHOTO_2584
0050: gosub @PHOTO_8699
03E4: enable_text_draw_align_right 1
081C: draw_text_outline 2 RGBA 0 0 0 255
033F: set_text_draw_letter_size 0.55 2.2
0340: set_text_draw_RGBA 0 128 255 255
045A: draw_text_1number 608.0 196.0 GXT 'DOLLAR' number 6@ // $~1~
:PHOTO_5140
0006: 6@ = 0
0A8D: 0@ = read_memory 0xB74494 size 4 virtual_protect 0
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
0A8D: 31@ = read_memory 0xB74494 size 4 virtual_protect 0
000A: 31@ += 4
0A8D: 31@ = read_memory 31@ size 4 virtual_protect 0
0006: 30@ = 0
:PHOTO_5213
0A8D: 21@ = read_memory 31@ size 1 virtual_protect 0
000A: 31@ += 1
00D6: if or
001B: 0 > 21@
0019: 21@ > 127
004D: jump_if_false @PHOTO_5272
000A: 0@ += 2584
0002: jump @PHOTO_5779
:PHOTO_5272
0085: 23@ = 30@ // (int)
0012: 23@ *= 256
005A: 23@ += 21@ // (int)
000A: 0@ += 1216
0A8D: 5@ = read_memory 0@ size 4 virtual_protect 0
0017: 5@ /= 1000.0
0013: 5@ *= -1.0
000B: 5@ += 2.0
0013: 5@ *= 10.0
000A: 0@ += -1148
0007: 22@ = 0.0
0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0
006B: 21@ *= 21@ // (float)
005B: 22@ += 21@ // (float)
000A: 0@ += 4
0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0
006B: 21@ *= 21@ // (float)
005B: 22@ += 21@ // (float)
000A: 0@ += 4
0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0
006B: 21@ *= 21@ // (float)
005B: 22@ += 21@ // (float)
000A: 0@ += 2508
0013: 22@ *= 10.0
005B: 5@ += 22@ // (float)
0441: 22@ = car 23@ model
09E1: get_car_model 22@ price_to 22@
0093: 22@ = integer 22@ to_float
0017: 22@ /= 2500.0
005B: 5@ += 22@ // (float)
00AA: store_car 23@ position_to 21@ 22@ 23@
00D6: if
86BD: not no_obstacles_between 21@ 22@ 23@ and 18@ 19@ 20@ solid 1 car 0 actor 0 object 0 particle 0
004D: jump_if_false @PHOTO_5602
0002: jump @PHOTO_5779
:PHOTO_5602
0050: gosub @PHOTO_8734
00D6: if or
0023: 0.0 > 24@
0021: 24@ > 640.0
0023: 0.0 > 25@
0021: 25@ > 448.0
0023: 0.0 > 26@
004D: jump_if_false @PHOTO_5677
0002: jump @PHOTO_5779
:PHOTO_5677
0013: 5@ *= 0.2
000B: 5@ += 0.5
0092: 5@ = float 5@ to_integer
0012: 5@ *= 5
0050: gosub @PHOTO_8699
033F: set_text_draw_letter_size 0.4125 1.65
0340: set_text_draw_RGBA 0 255 0 255
045A: draw_text_1number 24@ 25@ GXT 'DOLLAR' number 5@ // $~1~
005A: 16@ += 5@ // (int)
005A: 6@ += 5@ // (int)
:PHOTO_5779
000A: 30@ += 1
0019: 30@ > 109
004D: jump_if_false @PHOTO_5213
0050: gosub @PHOTO_8699
03E4: enable_text_draw_align_right 1
081C: draw_text_outline 2 RGBA 0 0 0 255
033F: set_text_draw_letter_size 0.55 2.2
0340: set_text_draw_RGBA 0 255 0 255
045A: draw_text_1number 608.0 168.0 GXT 'DOLLAR' number 6@ // $~1~
:PHOTO_5872
0006: 6@ = 0
0006: 0@ = 0xC88950
0006: 30@ = 0
:PHOTO_5896
000A: 0@ += 32
0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 12
0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0
0A8D: 23@ = read_memory 0xB7CB84 size 4 virtual_protect 0
0093: 23@ = integer 23@ to_float
00D6: if or
0025: 23@ > 21@ // (float)
0025: 22@ > 23@ // (float)
004D: jump_if_false @PHOTO_5997
000A: 0@ += 80
0002: jump @PHOTO_6540
:PHOTO_5997
0063: 21@ -= 22@ // (float)
0063: 23@ -= 22@ // (float)
0073: 23@ /= 21@ // (float)
000B: 23@ += 1.0
0087: 21@ = 23@ // (float)
000A: 0@ += -44
0A8D: 23@ = read_memory 0@ size 4 virtual_protect 0
00D6: if or
0039: 23@ == 4
0039: 23@ == 5
0039: 23@ == 8
0039: 23@ == 9
0039: 23@ == 12
004D: jump_if_false @PHOTO_6114
0007: 5@ = 1000.0
:PHOTO_6114
00D6: if
0039: 23@ == 1
004D: jump_if_false @PHOTO_6142
0007: 5@ = 1500.0
:PHOTO_6142
00D6: if or
0039: 23@ == 0
0039: 23@ == 2
0039: 23@ == 3
0039: 23@ == 11
004D: jump_if_false @PHOTO_6191
0007: 5@ = 2000.0
:PHOTO_6191
00D6: if or
0039: 23@ == 6
0039: 23@ == 7
0039: 23@ == 10
004D: jump_if_false @PHOTO_6233
0007: 5@ = 2500.0
:PHOTO_6233
006B: 5@ *= 21@ // (float)
0017: 5@ /= 10.0
0092: 5@ = float 5@ to_integer
0012: 5@ *= 5
000A: 0@ += 4
0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 4
0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 4
0A8D: 23@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 112
000B: 23@ += 0.1
00D6: if
86BD: not no_obstacles_between 21@ 22@ 23@ and 18@ 19@ 20@ solid 1 car 0 actor 0 object 0 particle 0
004D: jump_if_false @PHOTO_6388
0002: jump @PHOTO_6540
:PHOTO_6388
000B: 23@ += -0.1
0050: gosub @PHOTO_8734
00D6: if or
0023: 0.0 > 24@
0021: 24@ > 640.0
0023: 0.0 > 25@
0021: 25@ > 448.0
0023: 0.0 > 26@
004D: jump_if_false @PHOTO_6473
0002: jump @PHOTO_6540
:PHOTO_6473
0050: gosub @PHOTO_8699
033F: set_text_draw_letter_size 0.55 2.2
0340: set_text_draw_RGBA 255 0 0 255
045A: draw_text_1number 24@ 25@ GXT 'DOLLAR' number 5@ // $~1~
005A: 16@ += 5@ // (int)
005A: 6@ += 5@ // (int)
:PHOTO_6540
000A: 30@ += 1
0019: 30@ > 15
004D: jump_if_false @PHOTO_5896
0050: gosub @PHOTO_8699
03E4: enable_text_draw_align_right 1
081C: draw_text_outline 2 RGBA 0 0 0 255
033F: set_text_draw_letter_size 0.55 2.2
0340: set_text_draw_RGBA 255 0 0 255
045A: draw_text_1number 608.0 140.0 GXT 'DOLLAR' number 6@ // $~1~
0002: jump @PHOTO_623
:PHOTO_6640
01E3: show_text_1number_styled GXT 'REWARD' number 16@ time 5000 style 7 // REWARD $~1~
0109: player $PLAYER_CHAR money += 16@
0006: 6@ = 0
0006: 0@ = 0xB71F80
0006: 30@ = 0
:PHOTO_6691
0A8D: 21@ = read_memory 0@ size 2 virtual_protect 0
00D6: if
0039: 21@ == 20
004D: jump_if_false @PHOTO_6735
000A: 0@ += 40
0002: jump @PHOTO_7003
:PHOTO_6735
000A: 0@ += 4
0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 4
0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 4
0A8D: 23@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 28
000B: 23@ += 0.1
00D6: if
86BD: not no_obstacles_between 21@ 22@ 23@ and 18@ 19@ 20@ solid 1 car 0 actor 0 object 0 particle 0
004D: jump_if_false @PHOTO_6857
0002: jump @PHOTO_7003
:PHOTO_6857
000B: 23@ += -0.1
0050: gosub @PHOTO_8734
00D6: if or
0023: 0.0 > 24@
0021: 24@ > 640.0
0023: 0.0 > 25@
0021: 25@ > 448.0
0023: 0.0 > 26@
004D: jump_if_false @PHOTO_6942
0002: jump @PHOTO_7003
:PHOTO_6942
000A: 0@ += -16
0A8D: 5@ = read_memory 0xB7CB84 size 4 virtual_protect 0
0A8C: write_memory 0@ size 4 value 5@ virtual_protect 0
000A: 0@ += 4
0A8C: write_memory 0@ size 4 value 0.0 virtual_protect 0
000A: 0@ += 12
:PHOTO_7003
000A: 30@ += 1
0019: 30@ > 59
004D: jump_if_false @PHOTO_6691
0006: 6@ = 0
0006: 0@ = 0xC7C748
0006: 30@ = 0
:PHOTO_7048
000A: 0@ += 24
0A8D: 21@ = read_memory 0@ size 1 virtual_protect 0
00D6: if
0039: 21@ == 0
004D: jump_if_false @PHOTO_7099
000A: 0@ += 20
0002: jump @PHOTO_7420
:PHOTO_7099
000A: 0@ += 4
0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 4
0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0
0A8D: 23@ = read_memory 0xB7CB84 size 4 virtual_protect 0
0085: 5@ = 21@ // (int)
005A: 5@ += 22@ // (int)
00D6: if or
001D: 23@ > 5@ // (int)
001D: 21@ > 23@ // (int)
004D: jump_if_false @PHOTO_7208
000A: 0@ += 12
0002: jump @PHOTO_7420
:PHOTO_7208
000A: 0@ += -20
0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 4
0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 4
0A8D: 23@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 24
00D6: if
86BD: not no_obstacles_between 21@ 22@ 23@ and 18@ 19@ 20@ solid 1 car 0 actor 0 object 0 particle 0
004D: jump_if_false @PHOTO_7320
0002: jump @PHOTO_7420
:PHOTO_7320
0050: gosub @PHOTO_8734
00D6: if or
0023: 0.0 > 24@
0021: 24@ > 640.0
0023: 0.0 > 25@
0021: 25@ > 448.0
0023: 0.0 > 26@
004D: jump_if_false @PHOTO_7395
0002: jump @PHOTO_7420
:PHOTO_7395
000A: 0@ += -12
0A8C: write_memory 0@ size 4 value 0 virtual_protect 0
000A: 0@ += 12
:PHOTO_7420
000A: 30@ += 1
0019: 30@ > 15
004D: jump_if_false @PHOTO_7048
0006: 6@ = 0
0006: 0@ = 0xC891A8
0006: 30@ = 0
:PHOTO_7465
000A: 0@ += 16
0A8D: 21@ = read_memory 0@ size 1 virtual_protect 0
00D6: if
0039: 21@ == 0
004D: jump_if_false @PHOTO_7516
000A: 0@ += 20
0002: jump @PHOTO_7847
:PHOTO_7516
000A: 0@ += 4
0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 4
0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 4
0A8D: 23@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += -28
0A8D: 5@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 36
00D6: if and
8039: not 5@ == 16
8039: not 5@ == 17
8039: not 5@ == 18
8039: not 5@ == 19
8039: not 5@ == 20
8039: not 5@ == 39
8039: not 5@ == 58
004D: jump_if_false @PHOTO_7666
0002: jump @PHOTO_7847
:PHOTO_7666
00D6: if
86BD: not no_obstacles_between 21@ 22@ 23@ and 18@ 19@ 20@ solid 1 car 0 actor 0 object 0 particle 0
004D: jump_if_false @PHOTO_7714
0002: jump @PHOTO_7847
:PHOTO_7714
0050: gosub @PHOTO_8734
00D6: if or
0023: 0.0 > 24@
0021: 24@ > 640.0
0023: 0.0 > 25@
0021: 25@ > 448.0
0023: 0.0 > 26@
004D: jump_if_false @PHOTO_7789
0002: jump @PHOTO_7847
:PHOTO_7789
000A: 0@ += -36
0A8C: write_memory 0@ size 4 value 0 virtual_protect 0
000A: 0@ += 12
0A8D: 5@ = read_memory 0xB7CB84 size 4 virtual_protect 0
0A8C: write_memory 0@ size 4 value 5@ virtual_protect 0
000A: 0@ += 24
:PHOTO_7847
000A: 30@ += 1
0019: 30@ > 31
004D: jump_if_false @PHOTO_7465
0006: 6@ = 0
0A8D: 0@ = read_memory 0xB74490 size 4 virtual_protect 0
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
0A8D: 31@ = read_memory 0xB74490 size 4 virtual_protect 0
000A: 31@ += 4
0A8D: 31@ = read_memory 31@ size 4 virtual_protect 0
0006: 30@ = 0
:PHOTO_7941
0A8D: 21@ = read_memory 31@ size 1 virtual_protect 0
000A: 31@ += 1
000A: 0@ += 1988
00D6: if or
001B: 0 > 21@
0019: 21@ > 127
004D: jump_if_false @PHOTO_8000
0002: jump @PHOTO_8222
:PHOTO_8000
0085: 23@ = 30@ // (int)
0012: 23@ *= 256
005A: 23@ += 21@ // (int)
00D6: if
003C: $PLAYER_ACTOR == 23@ // (int)
004D: jump_if_false @PHOTO_8050
0002: jump @PHOTO_8222
:PHOTO_8050
005B: 5@ += 22@ // (float)
00A0: store_actor 23@ position_to 21@ 22@ 23@
00D6: if
86BD: not no_obstacles_between 21@ 22@ 23@ and 18@ 19@ 20@ solid 1 car 0 actor 0 object 0 particle 0
004D: jump_if_false @PHOTO_8120
0002: jump @PHOTO_8222
:PHOTO_8120
0050: gosub @PHOTO_8734
00D6: if or
0023: 0.0 > 24@
0021: 24@ > 640.0
0023: 0.0 > 25@
0021: 25@ > 448.0
0023: 0.0 > 26@
004D: jump_if_false @PHOTO_8195
0002: jump @PHOTO_8222
:PHOTO_8195
000A: 0@ += -704
0A8C: write_memory 0@ size 2 value 0 virtual_protect 0
000A: 0@ += 704
:PHOTO_8222
000A: 30@ += 1
0019: 30@ > 139
004D: jump_if_false @PHOTO_7941
0006: 0@ = 0xC88950
0006: 30@ = 0
:PHOTO_8261
000A: 0@ += 32
0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 12
0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0
0A8D: 23@ = read_memory 0xB7CB84 size 4 virtual_protect 0
0093: 23@ = integer 23@ to_float
00D6: if or
0025: 23@ > 21@ // (float)
0025: 22@ > 23@ // (float)
004D: jump_if_false @PHOTO_8362
000A: 0@ += 80
0002: jump @PHOTO_8588
:PHOTO_8362
000A: 0@ += -12
0A8C: write_memory 0@ size 4 value 23@ virtual_protect 0
000A: 0@ += 16
0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 4
0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 4
0A8D: 23@ = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 112
000B: 23@ += 0.1
00D6: if
86BD: not no_obstacles_between 21@ 22@ 23@ and 18@ 19@ 20@ solid 1 car 0 actor 0 object 0 particle 0
004D: jump_if_false @PHOTO_8503
0002: jump @PHOTO_8588
:PHOTO_8503
000B: 23@ += -0.1
0050: gosub @PHOTO_8734
00D6: if or
0023: 0.0 > 24@
0021: 24@ > 640.0
0023: 0.0 > 25@
0021: 25@ > 448.0
0023: 0.0 > 26@
004D: jump_if_false @PHOTO_8588
0002: jump @PHOTO_8588
:PHOTO_8588
000A: 30@ += 1
0019: 30@ > 15
004D: jump_if_false @PHOTO_8261
0108: destroy_object 4@
0A96: 4@ = actor $PLAYER_ACTOR struct
000A: 4@ += 20
0A8D: 4@ = read_memory 4@ size 4 virtual_protect 0
000A: 4@ += 56
0A8C: write_memory 4@ size 4 value 17@ virtual_protect 0
0249: release_model #CAMERA
0922: set_camera_zoom_in_factor 70.0 out_factor 70.0 timelimit 80 mode 1
015A: restore_camera
03F0: enable_text_draw 0
015D: set_gamespeed 2@
0002: jump @PHOTO_11
:PHOTO_8699
0342: enable_text_draw_centered 0
0345: enable_text_draw_background 0
0348: enable_text_draw_proportional 0
03E4: enable_text_draw_align_right 0
0349: set_text_draw_font 3
081C: draw_text_outline 1 RGBA 0 0 0 255
0051: return
:PHOTO_8734
068D: get_camera_position_to 24@ 25@ 26@
0063: 24@ -= 21@ // (float)
0063: 25@ -= 22@ // (float)
0063: 26@ -= 23@ // (float)
0013: 24@ *= -1.0
0013: 25@ *= -1.0
0400: store_coords_to 24@ 25@ 26@ from_object 4@ with_offset 24@ 26@ 25@
0073: 24@ /= 26@ // (float)
0073: 25@ /= 26@ // (float)
0801: get_camera_zoom_factor_to 23@ // float
0017: 23@ /= 2.0
02F7: 21@ = cosine 23@ // (float)
02F6: 22@ = sine 23@ // (float)
0073: 21@ /= 22@ // (float)
006B: 24@ *= 21@ // (float)
006B: 25@ *= 21@ // (float)
0013: 24@ *= 320.0
0013: 25@ *= 298.66
00D6: if
0023: 0.0 > 26@
004D: jump_if_false @PHOTO_8944
0013: 24@ *= -1.0
0013: 25@ *= -1.0
:PHOTO_8944
006B: 25@ *= 3@ // (float)
000B: 24@ += 320.5
000B: 25@ += 224.5
0051: return
:PHOTO_8974
0509: 27@ = distance_between_XY 28@ 29@ and_XY 0.0 0.0
0073: 28@ /= 27@ // (float)
0073: 29@ /= 27@ // (float)
0509: 27@ = distance_between_XY 28@ 29@ and_XY 0.0 1.0
0006: 0@ = 0
:PHOTO_9039
0017: 27@ /= 2.0
006B: 27@ *= 27@ // (float)
0087: 29@ = 27@ // (float)
0013: 27@ *= -1.0
000B: 27@ += 1.0
01FB: 27@ = square_root 27@
0013: 27@ *= -1.0
000B: 27@ += 1.0
006B: 27@ *= 27@ // (float)
005B: 27@ += 29@ // (float)
01FB: 27@ = square_root 27@
000A: 0@ += 1
0019: 0@ > 11
004D: jump_if_false @PHOTO_9039
0013: 27@ *= 4096.0
0017: 27@ /= 3.141529
0013: 27@ *= 180.0
00D6: if
0021: 28@ > 0.0
004D: jump_if_false @PHOTO_9229
0013: 27@ *= -1.0
000B: 27@ += 360.0
:PHOTO_9229
0051: return
Третий вопрос. Есть проверки на повреждённость (damaged) машин и объектов (0366, 03C9), есть также проверки на повреждённость какой-либо конкретной машины другой конкретной машиной или каким-то конкретным актёром и одним актёром другого актёра. Но нет проверки: получил (получает) ли актёр повреждения. Есть проверка с hit_by_weapon, но здесь требуются опять же какие-то конкретные цифры (номер оружия). Можно ли как-то через память проверить это: получил ли актёр любое повреждение. Я знаю, это можно осуществить путём сравнения хп: меньше - значит получил урон. В большинстве случаев этот способ применим, но не всегда.
080E: get_actor $Player_Actor ped_event_to 0@
if 0@==9 {EVENT_DAMAGE}
then
{...}
end
Попробуй
04E0: car 0@ abandon_path_radius 255
Также игрок на мгновение перестаёт существовать при смерти или аресте.
Если NLO есть в vehicles.ide, то SannyBuilder не должен выдавать ошибки при использовании модели #NLO в скрипте.
Вот порт на Alice моих скриптов для езды по стенам и подствольный гранатомёт.
Управление:
Подствольный гранатомёт:
Выбрать AK-47 или M-4 и нажать E для пуска гранат. Если у вас гранаты, то будет стрелять гранатами, а если коктейль Молотова, то будет стрелять горючими бутылками. Правда, из-за особенностей физики GTA4 и большого сопротивления воздуха гранаты не летят далеко.
Езда по стенам:
J - подпрыгнуть
Shift - ускориться
Из-за особенностей физики GTA4 мотоциклы будут уходить вбок при повороте.
Из-за особенностей работы скрипта машина если перевернётся то будет подпрыгивать.
Если у вас другой FPS чем у меня, то настройте UpperForce под себя.
Другое:
I - Скопировать в буфер обмена текущие координаты
U - Переместиться в координаты из буфера обмена
N -
K - Получить санчез
J - получить Mule
library StickyAndGrenade; {$R *.res} {$E ext}
uses
Windows,
SysUtils,
Clipbrd,
ScriptNatives,
ScriptTypes,
ScriptUseful;
const
Rus ='АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя';
EncodedRus='Ћ ‘’“”•–—˜™љ›њ ћџ ЎўЈ¤Ґ¦§Ё©Є«¬®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМН';
function EncodeRus(const text: string): string;
var I,p: Integer;
begin
Result:=Text;
for I:=1 to Length(Result) do
begin
if Result[i]='ё' then Result[i]:='е';
if Result[i]='Ё' then Result[i]:='Е';
p:=pos(Result[i], Rus);
if p>0 then Result[i]:=EncodedRus[p];
end;
end;
function DecodeRus(const text: string): string;
var I,p: Integer;
begin
Result:=Text;
for I:=1 to Length(Result) do
begin
p:=pos(Result[i], EncodedRus);
if p>0 then Result[i]:=Rus[p];
end;
end;
procedure ShowText(text: string; time: integer = 5000);
begin
PrintStringWithLiteralStringNow('string', PChar(EncodeRus(text)), time, 1);
end;
function Round(X: Extended): Int64;
begin
Result:=System.Round(X);
end;
function FTS(Value: Extended): string;
begin
DecimalSeparator:='.';
Result:=FloatToStrF(Value,ffFixed,10,3);
end;
function ReadNum(S: string; var I: Integer): Single;
var ts: string;
begin
while not (S[i] in ['0'..'9', '-', '.']) and (I<=Length(S)) do Inc(I);
ts:='';
while (S[i] in ['0'..'9', '-', '.']) and (I<=Length(S)) do
begin
ts:=ts+S[i];
Inc(I);
end;
//ShowText(ts,2000);
//Wait(2000);
Result:=StrToFloat(ts);
end;
procedure SpawnCar(Name : PChar);
var
PlayerId : Player;
PlayerChar : Ped;
Car : Vehicle;
Hash : Cardinal;
X, Y, Z : f32;
begin
PlayerId := GetPlayerId();
if PlayerId >= 0 then
if IsPlayerPlaying(PlayerId) then
if PlayerHasChar(PlayerId) then
begin
GetPlayerChar(PlayerId, @PlayerChar);
if PlayerChar > 0 then
begin
Hash := GetHashKey(Name);
RequestModel(Hash);
while not HasModelLoaded(Hash) do Wait(10);
GetOffsetFromCharInWorldCoords(PlayerChar, 0, 5, 0, @X, @Y, @Z);
CreateCar(Hash, X, Y, Z, @Car, True);
MarkModelAsNoLongerNeeded(Hash);
MarkCarAsNoLongerNeeded(@Car);
PrintStringWithLiteralStringNow('string', PChar(Name + ' spawned !'), 5000, 1);
end;
end;
end;
var
MemInfo: TMemoryBasicInformation;
ModName: array[0..MAX_PATH] of Char;
S: string;
//Если что не понятно, спрашивайте в темке.
procedure main(); export;
const
MaxObjs=16; // Максимальное кол-во летящих одновременно гранат
ReloadTime=500;// Время перезарядки в мс
var
Objs: array [0..MaxObjs-1] of LongWord;
ObjsStartTimes: array [0..MaxObjs-1] of Integer;
procedure CheckObjs;
var
I: Integer;
CurTime: Integer;
Model: LongWord;
X,Y,Z: Single;
begin
GetGameTimer(@CurTime);
for I:=0 to MaxObjs-1 do
begin
if DoesObjectExist(Objs[i]) and (Objs[i]>0) then
begin
if HasObjectCollidedWithAnything(Objs[i])
or IsObjectInWater(Objs[i])
or (CurTime-ObjsStartTimes[i] = 5000) then
begin
GetObjectCoordinates(Objs[i], @X, @Y, @Z);
GetObjectModel(Objs[i], @Model);
if Model=GetHashKey('w_grenade') then
AddExplosion(X,Y,Z, 0, 5.5, 1, 0, 1.0);
if Model=GetHashKey('w_molotov') then
AddExplosion(X,Y,Z, 1, 5.5, 1, 0, 1.0);
DeleteObject(@Objs[i]);
end;
end;
end;
end;
function GetFreeObjIndex: Integer;
var I: Integer;
begin
Result:=-1;
for I:=0 to MaxObjs-1 do
if not DoesObjectExist(Objs[i]) then
begin
Result:=I;
ShowText('OK', 1000);
Exit;
end;
ShowText('~r~Fail', 1000);
end;
var
PlayerId : Player;
PlayerChar : Ped;
PlayerCar: Vehicle;
UpperForce: Single;
//S: string;
X,Y,Z: Single;
I,N: Integer;
LastTime, CurTime: Integer;
SLastTime, SCurTime: Integer;
Cam, Weap, Ammo, WeapModel: Cardinal;
RotX,RotY,RotZ,Vx,Vy,Vz: Single;
BonePos: Vector3;
//---------------
ptfx: Cardinal;
begin
Wait(2000);
try
DecimalSeparator:='.';
LastTime:=0;
SLastTime:=0;
//ShowText('Липучка (123456.654321)');
UpperForce:=0.65;
while True do
begin
PlayerId := GetPlayerId();
if PlayerId >= 0 then
if IsPlayerPlaying(PlayerId) then
if PlayerHasChar(PlayerId) then
begin
GetPlayerChar(PlayerId, @PlayerChar);
if PlayerChar > 0 then
begin
if KeyPressed(Ord('U')) then
begin
S:=Clipboard.AsText;
I:=1;
try
X:=ReadNum(S,I);
Y:=ReadNum(S,I);
Z:=ReadNum(S,I);
SetCharCoordinates(PlayerChar, X, Y, Z);
ShowText('Выполнен переход на ~n~'+FTS(X)+', '+FTS(Y)+', '+FTS(Z));
except
on EConvertError do ShowText('~r~Неверный формат координат телетортации!');
end;
end;
if KeyPressed(Ord('I')) then
begin
GetCharCoordinates(PlayerChar, @X, @Y, @Z);
ShowText('Скопировано '+FTS(X)+', '+FTS(Y)+', '+FTS(Z));
Clipboard.AsText:=fts(X)+', '+fts(Y)+', '+fts(Z);
end;
CheckObjs;
GetCurrentCharWeapon(PlayerChar, @Weap);
GetGameTimer(@CurTime);
if KeyPressed(Ord('E')) and
KeyPressed(VK_RBUTTON) and
(Weap in [14,15]) and
(CurTime-LastTime>ReloadTime) then
begin
PlaySound(-1, 'ball_returned');
GetPedBonePosition(PlayerChar,1232,0.42,0.05,-0.15,@BonePos);
GetCharCoordinates(PlayerChar,@X,@Y,@Z);
GetDistanceBetweenCoords3D(BonePos.X,BonePos.Y,BonePos.Z,X,Y,Z,@X);
N:=GetFreeObjIndex;
GetCharWeaponInSlot(PlayerChar, 8, @Weap, @Ammo, @WeapModel);//04B8
if Ammo<=0 then ShowText('Нет гранат!');
if (X<2.0) and (N<>-1) and (Ammo>0) then
begin
CreateObject(WeapModel,BonePos.X,BonePos.Y,BonePos.Z,@Objs[N],True);
Dec(Ammo);
SetCharAmmo(PlayerChar, Weap, Ammo);
SetObjectVisible(Objs[N],False);
SetActivateObjectPhysicsAsSoonAsItIsUnfrozen(Objs[N], true);
GetGameCam(@Cam);
GetCamRot(Cam,@rotX,@rotY,@rotZ);
RotZ:=RotZ+90.0;
Vx:=ScriptNatives.Cos(rotZ)*50.0;
Vy:=ScriptNatives.Sin(rotZ)*50.0;
Vz:=ScriptNatives.Sin(rotX)*50.0;
ApplyForceToObject(Objs[N],1,Vx,Vy,Vz,0.0,0.0,0.0,0,1,1,1);// Эта конструкция может показаться странной: мол, зачем повторять 2 раза и делать задержку?
Wait(0); // На самом деле при одинарном вызывании без задержки объект вообще не будет двигаться.
ApplyForceToObject(Objs[N],1,Vx,Vy,Vz,0.0,0.0,0.0,0,1,1,1);//
SetObjectVisible(Objs[N],True);
SetObjectRecordsCollisions(Objs[N],True);
GetGameTimer(@ObjsStartTimes[N]);
GetGameTimer(@LastTime);
end;
end;
//SetPlayerInvincible(PlayerId, True);
//SetPlayerNeverGetsTired(PlayerId, True);
//SetPoliceIgnorePlayer(PlayerId, True);
if KeyPressed(Ord('N')) then
begin
ptfx:=StartPtfxOnPedBone('exp_trespass_mid', PlayerChar, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1205, 1065353216);
Wait(5000);
StopPtfx(ptfx);
end;
if KeyPressed(Ord('K')) then
begin
SpawnCar('sanchez');
end;
if KeyPressed(Ord('J')) then
begin
SpawnCar('mule');
end;
{if KeyPressed(Ord('M')) then
begin
GetPedBonePosition(PlayerChar,1232,0.42,0.05,-0.15,@BonePos);
CreateObject(GetHashKey('w_grenade'),BonePos.X,BonePos.Y,BonePos.Z,@Obj,True);
ShowText(fts(X));
SetObjectCollision(Obj,False);
end;}
if IsCharInAnyCar(PlayerChar) then
begin
StoreCarCharIsInNoSave(PlayerChar, @PlayerCar);
while IsPlayerPlaying(PlayerId) and IsCharInCar(PlayerChar, PlayerCar) do
begin
if KeyPressed(Ord('J')) and (SCurTime-SLastTime<200) then
begin
ApplyForceToCar(PlayerCar,1,0.0,0.0,1.0,0.0,2.0,0.0,1,1,1,1);
//Wait(90);
//ApplyForceToCar(PlayerCar,1,0.0,0.0,1.0,0.0,1.0,0.0,1,1,1,1);
end;
if KeyPressed(VK_SHIFT) and (SCurTime-SLastTime<200) then
begin
ApplyForceToCar(PlayerCar,1,0.0,1.0,0.0,0.0,0.0,0.0,1,1,1,1);
//Wait(90);
//ApplyForceToCar(PlayerCar,1,0.0,0.0,1.0,0.0,1.0,0.0,1,1,1,1);
end;
//ShowText(FTS(UpperForce),100);
{TODO:Сделать мод езденья по стенам и узнать назначение остальных параметров}
GetGameTimer(@SCurTime);
if not IsCarInAirProper(PlayerCar) then
begin
GetGameTimer(@SLastTime);
end;
ShowText(IntToStr(SCurTime-SLastTime),100);
if SCurTime-SLastTime<500 then
begin
ApplyForceToCar(PlayerCar,1,0.0,0.0,UpperForce,0.0,0.0,0.0,1,0,1,1);
ApplyForceToCar(PlayerCar,1,0.0,0.0,-UpperForce,0.0,0.0,0.0,1,1,1,1);
end;
Wait(25);
end;
end;
end;
end;
Wait(50);
end;
except
on E: Exception do
begin
Windows.Beep(100, 100);
Windows.Beep(1600, 100);
Windows.Beep(100, 100);
Windows.Beep(1600, 100);
Windows.Beep(100, 100);
Windows.Beep(1600, 100);
ShowText('-------------------------------',0);
ShowText('или в крайнем случае на ящик VcSaJen@ya.ru',0);
ShowText('Пожалуйста сообщите эти данные автору в темке RaCon на [url=http://forums.gtamodding.ru/,0)]http://forums.gtamodding.ru/',0)[/url];
ShowText('Адрес: '+IntToHex(Integer(ExceptAddr),8),0);
ShowText('Адрес Main: '+IntToHex(Integer(@main),8),0);
VirtualQuery(ExceptAddr, MemInfo, SizeOf(MemInfo));
if (MemInfo.State = MEM_COMMIT) and
(GetModuleFileName(THandle(MemInfo.AllocationBase), ModName, SizeOf(ModName)) <> 0) then
begin
S:=ModName;
Delete(S, Pos(GetCurrentDir,S), Length(GetCurrentDir)+1);
//ShowText('Локальный адрес Base: '+IntToHex(Integer(ExceptAddr)-Integer(MemInfo.BaseAddress),8),0);
ShowText('Локальный адрес: '+IntToHex(Integer(ExceptAddr)-(Integer(MemInfo.AllocationBase)+$1000),8),0);
//ShowText('Base: '+IntToHex(Integer(MemInfo.BaseAddress),8),0);
ShowText('Allocation base: '+IntToHex(Integer(MemInfo.AllocationBase),8),0);
ShowText('Модуль: '+S,0);
end
else begin
end;
ShowText(E.Message,0);
ShowText('Класс: '+E.ClassName,0);
ShowText('-------------------------------',0);
ShowText(' Информация об ошибке:',0);
ShowText('-------------------------------',0);
AddNextMessageToPreviousBriefs(False);
ShowText('В RaCon возникла ошибка. Перепишите информацию об ошибке и перезагрузите игру.',5000);
Wait(5000);
{'~r~'+E.ClassName+': '+E.Message}
AddNextMessageToPreviousBriefs(False);
ShowText('Информацию об ошибке смотрите в "Истории" (Briefs) в меню (2-й пункт, сразу после "Карты").',60000);
//Clipboard.AsText:=E.Message;
Exit;
end;
end;
end;
exports main;
end.
странно, что компилятор на неё не ругается, ; не является символом комментария...
; не является комментарием официально, но практически является комментарием.
Попробуй в самом начале строки написать ; и эта строка не скомпилируется.
Ещё можно закомментировать конец комментария: в начале скрипта если написать {;} то скрипт не скомпилируется.
и еще: как свою txd текстуру вывести на экран гта са?
Это рассказано в статье Рисование на экране (op 03F0, 0390, 0391, 038F, 038D, 074B, 03E3)
Чтобы он помогал тебе из drive by, нужно поменять его Decision Maker:
{$CLEO}
wait 4000
0@ = Actor.Create(Gang2, #MALE01, 2503.4812, -1671.2251, 13.3625)
#AK47.Load
while not #AK47.Available
wait 0
end
01B2: give_actor 0@ weapon 30 ammo 99999
#AK47.Destroy
060A: create_decision_maker_type 0 store_to 1@
0708: reset_decision_maker 1@ event 36
0708: reset_decision_maker 1@ event 37
0709: set_decision_maker 1@ on_event 36 taskID 1022 chance_if_acquaintance respect 0.0 hate 100.0 unk_like_dislike 0.0 unk_like_dislike 0.0 in_car 1 on_foot 0
0709: set_decision_maker 1@ on_event 37 taskID 1022 chance_if_acquaintance respect 0.0 hate 1.0 unk_like_dislike 0.0 unk_like_dislike 0.0 in_car 1 on_foot 0
0709: set_decision_maker 1@ on_event 36 taskID 1024 chance_if_acquaintance respect 0.0 hate 100.0 unk_like_dislike 0.0 unk_like_dislike 0.0 in_car 0 on_foot 1
060B: set_actor 0@ decision_maker_to 1@
0631: put_actor 0@ in_group $PLAYER_GROUP
077A: set_actor 0@ acquaintance 1 {respect} to_actors_pedtype 0
077A: set_actor 0@ acquaintance 1 {respect} to_actors_pedtype 8
077A: set_actor 0@ acquaintance 3 {dislike} to_actors_pedtype 6
077A: set_actor 0@ acquaintance 4 {hate} to_actors_pedtype 7
077A: set_actor 0@ acquaintance 4 {hate} to_actors_pedtype 9
077A: set_actor 0@ acquaintance 4 {hate} to_actors_pedtype 11
077A: set_actor 0@ acquaintance 4 {hate} to_actors_pedtype 12
077A: set_actor 0@ acquaintance 4 {hate} to_actors_pedtype 17
while not Actor.Dead(0@)
wait 1500
end
Actor.RemoveReferences(0@)
065C: release_decision_maker 1@
0A93: end_custom_thread
Это не будет работать в CLEO-миссиях, но в простых cs CLEO-скриптах будет работать!
{$CLEO}
{$I testinclude.txt}
wait 10000
04C4: store_coords_to 1@ 2@ 3@ from_actor $Player_Actor with_offset 0.0 3.0 1.0
0AB1: @mk_car 5 params model #TURISMO coords 1@ 2@ 3@ angle 180.0 store to 0@ //make car
Car.RemoveReferences(0@)
0A93: end_custom_threadjump @tesinclude_end
:mk_car
Model.Load(0@)
038B: load_requested_models
while 8248: not model 0@ available
wait 10
end
5@ = Car.Create(0@, 1@, 2@, 3@)
Model.Destroy(0@)
Car.Angle(5@) = 4@
0AB2: ret 1 5@
:mk_act
Model.Load(0@)
038B: load_requested_models
while 8248: not model 0@ available
wait 10
end
6@ = Actor.Create(1@, 0@, 2@, 3@, 4@)
Model.Destroy(0@)
Actor.Angle(6@) = 5@
0AB2: ret 1 6@
:mk_act_in_car
Model.Load(0@)
038B: load_requested_models
while 8248: not model 0@ available
wait 10
end
if
3@ == -1
then
0129: 4@ = create_actor_pedtype 1@ model 0@ in_car 2@ driverseat
else
01C8: 4@ = create_actor_pedtype 1@ model 0@ in_car 2@ passenger_seat 3@
end
Model.Destroy(0@)
0AB2: ret 1 4@
:give_weap
Model.Load(0@)
038B: load_requested_models
while 8248: not model 0@ available
wait 10
end
01B2: give_actor 3@ weapon 1@ ammo 2@
Model.Destroy(0@)
0AB2: ret 0
:derail
{0A97: 1@ = car 0@ struct
while 1@ <> 0
0A8E: 2@ = 1@ + 0x40 // int
0A8E: 3@ = 1@ + 0x5B9 // int
0A8D: 4@ = read_memory 2@ size 4 virtual_protect 0
0A8D: 5@ = read_memory 3@ size 1 virtual_protect 0
08C3: clear 4@ bit 2
08C3: clear 4@ bit 17
08BD: set 5@ bit 0
0A8C: write_memory 2@ size 4 value 4@ virtual_protect 0
0A8C: write_memory 3@ size 1 value 5@ virtual_protect 0
1@ += 0x5D4
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
end}
06DE: 0@ = get_train 0@ last_carriage_handle
0A97: 1@ = car 0@ struct
while 1@ <> 0
0A8E: 2@ = 1@ + 0x40 // int
0A8E: 3@ = 1@ + 0x5B9 // int
0A8D: 4@ = read_memory 2@ size 4 virtual_protect 0
0A8D: 5@ = read_memory 3@ size 1 virtual_protect 0
08C3: clear 4@ bit 2
08C3: clear 4@ bit 17
08BD: set 5@ bit 0
0A8C: write_memory 2@ size 4 value 4@ virtual_protect 0
0A8C: write_memory 3@ size 1 value 5@ virtual_protect 0
1@ += 0x5D0
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
wait 100
end
0AB2: ret 0
:tesinclude_endГлавное НЕ скомпилировать случайно вместо скрипта сам этот инклуд testinclude.txt.
0851: set_actor $PLAYER_ACTOR decrease_health_by 10 flag 1
Флаг отвечает за то, отнимать только здоровье или отнять с учётом брони.
Два скрипта, повышающих реалистичность.
Вы заметили, что перекрашивается в pay'n'spray только CJ? Что заходит внутрь здания с дверью может тоже только CJ?
Эти два примера скриптов исправляют эти неточности. Теперь на перекраску pay'n'spray в SF в Doherty возле гаража регулярно ездят разные машины, а в C'Bell (2423.5 -1509.28 24.0411) заходят люди (но никто не выходит, но это тоже можно сделать):
{$CLEO}
//{$I Interceptor.txt}
var
21@: Actor
9@: Object
$Player_Actor: Actor
22@: Float
23@: Float
24@: Float
end
wait 2000
:begin
03DE: set_pedestrians_density_multiplier_to 99.0
0@ = 2419.3
1@ = -1510.48
2@ = 22.9922
3@ = 0.3
gosub @AIC_GETOBJECT
while true
if 00A4: actor $Player_Actor sphere 0 in_cube 2413.68 -1507.48 22.96 2419.43 -1510.768 25.46
then
$Player_Actor.StorePos(22@, 23@, 24@)
25@ = $Player_Actor.Angle
22@ -= 2419.43
23@ -= -1510.768
24@ -= 25.46
22@ += 366.775
23@ += -14.36
24@ += 1000.81
0860: link_actor $PLAYER_ACTOR to_interior 9
select_interior 9
$Player_Actor.LockInCurrentPosition = true
09BC: put_actor $PLAYER_ACTOR at 22@ 23@ 24@
wait 2000
$Player_Actor.LockInCurrentPosition = false
end
073F: get_actor_in_sphere 2423.5 -1509.28 24.0411 radius 1.8 with_pedtype_civilian 1 gang 1 criminal/prostitute 1 handle_as 21@
if //and
056D: actor 21@ defined
// 9@>0
// 00FE: actor $Player_Actor sphere 0 in_sphere 2423.5 -1509.28 24.0411 radius 20.0 20.0 10.0
then
if 03ca: object 9@ exists
jf @begin
0687: clear_actor 21@ task
07FB: set_interior 'FDCHICK' access 0
05D6: clear_scmpath
05D7: add_point_to_scmpath 2419.87 -1509.5475 24.0411
05D7: add_point_to_scmpath 2415.27 -1509.5475 24.0411
05D8: AS_assign_scmpath to_actor 21@ flags 6 0
0905: set_door 9@ openable 0
wait 6000
21@.DestroyWithFade
07FB: set_interior 'FDCHICK' access 1
end
wait 0
end
:AIC_GETOBJECT
0006: 16@ = 305871
0006: 17@ = @AIC_TESTOBJECTHANDLE
0006: 20@ = 412
:AIC_STARTSEARCH
0085: 4@ = 16@ // (int)
008B: 4@ = &0(4@,1i) // (int)
0085: 19@ = 4@ // (int)
000E: 19@ -= 10787160
0016: 19@ /= 4
008B: 19@ = &0(19@,1i) // (int)
000E: 4@ -= 10787168
0016: 4@ /= 4
008B: 4@ = &0(4@,1i) // (int)
0006: 9@ = -1
0085: 11@ = 4@ // (int)
0006: 10@ = 0
:AIC_SEARCHLOOPMAIN
000A: 4@ += 20
0050: gosub @AIC_READ4B
0085: 4@ = 5@ // (int)
8039: not 4@ == 0
004D: jump_if_false @AIC_SEARCHLOOPNEXT
000A: 4@ += 48
0050: gosub @AIC_READ4B
0085: 12@ = 5@ // (int)
000A: 4@ += 4
0050: gosub @AIC_READ4B
0085: 13@ = 5@ // (int)
000A: 4@ += 4
0050: gosub @AIC_READ4B
0085: 14@ = 5@ // (int)
050A: 15@ = distance_between_XYZ 0@ 1@ 2@ and_XYZ 12@ 13@ 14@
0025: 3@ > 15@ // (float)
004D: jump_if_false @AIC_SEARCHLOOPNEXT
0085: 9@ = 10@ // (int)
0085: 4@ = 16@ // (int)
008B: 4@ = &0(4@,1i) // (int)
000A: 4@ += 4
0050: gosub @AIC_READ4B
0085: 4@ = 5@ // (int)
005A: 4@ += 9@ // (int)
0050: gosub @AIC_READ1B
0012: 9@ *= 256
005A: 9@ += 5@ // (int)
0002: jump 17@
:AIC_TESTOBJECTHANDLE
//0001: wait 0
83CA: not object 9@ exists
004D: jump_if_false @AIC_NEWSEARCHRADIUS
:AIC_NOHANDLE
0006: 9@ = -1
0002: jump @AIC_SEARCHLOOPNEXT
:AIC_NEWSEARCHRADIUS
{
use 0051: return to break the loop
immediately when found at least one actor/car/object,
does not matter if he's nearest one.
}
// v EXTRA SEARCH CRITERIA GOES HERE v
{
21@ contains the handle of an actor/car/object
that should be excluded from the search result
(for example a handle found previously).
}
//803B: 21@ <> 9@
//004D: jump_if_false @AIC_NOHANDLE
0085: 3@ = 15@
:AIC_SEARCHLOOPNEXT
005A: 11@ += 20@ // (int)
0085: 4@ = 11@ // (int)
000A: 10@ += 1
002D: 10@ >= 19@ // (int)
004D: jump_if_false @AIC_SEARCHLOOPMAIN
0051: return
// ---------------------------------
:AIC_READ1B
0085: 6@ = 4@ // (int)
0085: 8@ = 4@ // (int)
0016: 4@ /= 4
0012: 4@ *= 4
0062: 8@ -= 4@ // (int)
0012: 8@ *= 8
000E: 4@ -= 10787168
0016: 4@ /= 4
008B: 7@ = &0(4@,1i) // (int)
0085: 4@ = 6@ // (int)
0006: 5@ = 0
0006: 6@ = 0
:AIC_READ1B_LOOP
08B9: test 7@ bit 8@
004D: jump_if_false @AIC_READ1B_NEXTBIT
08BF: set 5@ bit 6@
:AIC_READ1B_NEXTBIT
000A: 6@ += 1
000A: 8@ += 1
0039: 6@ == 8
004D: jump_if_false @AIC_READ1B_LOOP
0051: return
:AIC_READ4B
0085: 6@ = 4@ // (int)
000E: 4@ -= 10787168
0016: 4@ /= 4
008B: 5@ = &0(4@,1i) // (int)
0085: 4@ = 6@ // (int)
0051: return{$CLEO}
thread 'allspray'
var
0@: Car
1@: Actor
end
while true
if and
$ONMISSION == 0
09E7: player $PLAYER_CHAR not_frozen
then
073E: get_car_in_sphere -2003.8384 227.2971 27.6286 radius 5.0 model -1 handle_as 0@
if 056E: car 0@ defined
then
046C: 1@ = car 0@ driver
if and
8969: not car 0@ is_noncivilian_vehicle
// 82CA: not car 0@ bounding_sphere_visible
056D: actor 1@ defined
then
//if 88A7: not car 0@ componentA 0 opened_or_not_present
//then
// 0730: car 0@ damage_component 0 // versionA
//end
//if 88A7: not car 0@ componentA 1 opened_or_not_present
//then
// 0730: car 0@ damage_component 1 // versionA
//end
//if 88A7: not car 0@ componentA 2 opened_or_not_present
//then
// 0730: car 0@ damage_component 2 // versionA
//end
//if 88A7: not car 0@ componentA 3 opened_or_not_present
//then
// 0730: car 0@ damage_component 3 // versionA
//end
//if 88A7: not car 0@ componentA 4 opened_or_not_present
//then
// 0730: car 0@ damage_component 4 // versionA
//end
//if 88A7: not car 0@ componentA 5 opened_or_not_present
//then
// 0730: car 0@ damage_component 5 // versionA
//end
0@.Health = 300
0@.SetDriverBehaviour(Nowhere)
05EC: release_car 0@ from_path
0763: add_car_reference 0@
04E0: car 0@ abandon_path_radius 255
05D6: clear_scmpath
05D7: add_point_to_scmpath -2003.8384 227.2971 27.6286
05D7: add_point_to_scmpath -1976.7947 225.4384 30.0353
05D7: add_point_to_scmpath -1909.8403 227.9722 34.8952
05D7: add_point_to_scmpath -1905.1957 274.6925 40.5465
05D7: add_point_to_scmpath -1904.9829 283.7856 40.5509
07E7: AS_assign_scmpath_to_actor 1@ in_car 0@ speed 15.0 flags 1 0 1
// 0@.DriveTo(-1904.9829 283.7856 40.5509)
while true
if {or}
856E: not car 0@ defined
// 0@.Wrecked
then
jump @clr
end
if 01AF: car 0@ sphere 0 in_sphere -1904.9829 283.7856 40.5509 radius 3.0 3.0 3.0
then
Break
end
wait 0
end
Garage.Close('SPRSFSE')
0@.LockInCurrentPosition = True
wait 3000
if {or}
856E: not car 0@ defined
// 0@.Wrecked
then
jump @clr
end
0A30: repair_car 0@
Garage.Open('SPRSFSE')
wait 850
if or
856E: not car 0@ defined
// 0@.Wrecked
856D: not actor 1@ defined
then
jump @clr
end
0@.Angle = 0.0
0@.LockInCurrentPosition = False
//0@.SetSpeedInstantly(-20.0)
0477: set_car 0@ animation 3 time 2000
wait 2000
if or
856E: not car 0@ defined
// 0@.Wrecked
856D: not actor 1@ defined
then
jump @clr
end
05D6: clear_scmpath
// 05D7: add_point_to_scmpath -1904.9829 283.7856 40.5509
// 05D7: add_point_to_scmpath -1905.1957 274.6925 40.5465
// 05D7: add_point_to_scmpath -1908.2749 262.5012 40.3984
05D7: add_point_to_scmpath -1910.8593 239.3272 34.8993
05D7: add_point_to_scmpath -1915.2561 231.8239 34.6498
05D7: add_point_to_scmpath -1975.5681 230.8239 29.9494
05D7: add_point_to_scmpath -2003.8384 227.2971 27.6286
07E7: AS_assign_scmpath_to_actor 1@ in_car 0@ speed 5.0 flags 1 0 1
while true
if {or}
856E: not car 0@ defined
// 0@.Wrecked
then
jump @clr
end
if 01AF: car 0@ sphere 0 in_sphere -2003.8384 227.2971 27.6286 radius 5.0 5.0 5.0
then
Break
end
wait 0
end
0@.SetDriverBehaviour(FollowRoad)
:clr
0@.RemoveReferences
1@.RemoveReferences
wait 10000
end
end
end
wait 0
end
Трамвай теперь не пустой, а таскает сидящих внутри него людей.
thread 'trampeople'
{$CLEO}
//{$I Interceptor.txt}
var
$PLAYER_CHAR: Player
$PLAYER_ACTOR: Actor
end
//0615: define_AS_pack_begin $8201
// 0A1A: actor -1 perform_animation "SEAT_DOWN" IFP_file "PED" 4.0 loopA 0 lockX 0 lockY 0 lockF 1 -1 ms // versionC
// 0A1A: actor -1 perform_animation "SEAT_IDLE" IFP_file "PED" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 -1 ms // versionC
//0616: define_AS_pack_end $8201
while true
if $PLAYER_CHAR.Defined
then
$PLAYER_ACTOR.StorePos(1@, 2@, 3@)
//$PLAYER_ACTOR.StorePos(3@, 4@, 33@)
//1@+=100.0
//2@+=100.0
//3@-=100.0
//4@-=100.0
//09C0: 0@ = get_random_car_in_area 1@ 2@ 3@ 4@ 1.0 with_models #TRAM
//053E: 0@ = get_random_car_with_model #TRAM in_rectangle 1@ 2@ 3@ 4@
//0327: 0@ = get_random_car_with_model #TRAM in_rectangle 1@ 2@ 3@ 4@
0AB1: call_scm_func @FUNC_GETVEHICLE 4 1@ 2@ 3@ 100.0 0@
//0AB1: call_scm_func @FUNC_GETOBJECT 4 1@ 2@ 3@ 100.0 0@
//if 0@>0
//then
// 0513: show_text_box_1number 'NUMBER' number 777 // ~1~
//end
end
wait 1000
end
{
Для мода трамвая:
-1.142 1.461 0.239
-1.142 2.675 0.239
-1.142 3.725 0.239
1.177 1.59 0.239
1.177 2.826 0.239
1.177 3.803 0.239
-0.398 -2.56 0.239
-0.398 -1.555 0.239
-0.398 -0.58 0.239
0.437 -2.624 0.239
0.437 -1.539 0.239
0.437 -0.548 0.239
Для мода скамеек:
-1,112 -0,884 -0,337
1,102 0,934 0,781
825.8475, -1863.8035, 12.8672
}
:MyFunc2
0AB2: ret 0
{Object.StorePos(0@, 10@, 11@, 12@)
Object.StorePos(0@, 13@, 14@, 15@)
if 8339: not anything_in_cube 10@ 11@ 12@ 13@ 14@ 15@ solid 0 car 0 actor 1 object 0 particle 0
then
Object.StorePos(0@, 10@, 11@, 12@)
13@ = Object.Angle(0@)
10@ += -0.48
11@ += -0.368
12@ += 0.281
0376: 2@ = create_random_actor_at 0.0 0.0 0.0
0972: put_actor 2@ at 10@ 11@ 12@ ; versionC
Actor.Angle(2@)=13@
0A1A: actor 2@ perform_animation "SEAT_IDLE" IFP_file "PED" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 -1 ms // versionC
0AB1: call_scm_func @SetActorRef 2 2@ 1
Object.StorePos(0@, 10@, 11@, 12@)
13@ = Object.Angle(0@)
10@ += 0.448
11@ += -0.368
12@ += 0.281
0376: 2@ = create_random_actor_at 0.0 0.0 0.0
0972: put_actor 2@ at 10@ 11@ 12@ ; versionC
Actor.Angle(2@)=13@
0A1A: actor 2@ perform_animation "SEAT_IDLE" IFP_file "PED" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 -1 ms // versionC
0AB1: call_scm_func @SetActorRef 2 2@ 1
Object.StorePos(0@, 10@, 11@, 12@)
13@ = Object.Angle(0@)
10@ += 0.448
11@ += 0.425
12@ += 0.281
13@ += 180.0
0376: 2@ = create_random_actor_at 0.0 0.0 0.0
0972: put_actor 2@ at 10@ 11@ 12@ ; versionC
Actor.Angle(2@)=13@
0A1A: actor 2@ perform_animation "SEAT_IDLE" IFP_file "PED" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 -1 ms // versionC
0AB1: call_scm_func @SetActorRef 2 2@ 1
Object.StorePos(0@, 10@, 11@, 12@)
13@ = Object.Angle(0@)
10@ += -0.414
11@ += 0.425
12@ += 0.281
13@ += 180.0
0376: 2@ = create_random_actor_at 0.0 0.0 0.0
0972: put_actor 2@ at 10@ 11@ 12@ ; versionC
Actor.Angle(2@)=13@
0A1A: actor 2@ perform_animation "SEAT_IDLE" IFP_file "PED" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 -1 ms // versionC
0AB1: call_scm_func @SetActorRef 2 2@ 1
end}
:MyFunc
Car.StorePos(0@, 10@, 11@, 12@)
Car.StorePos(0@, 13@, 14@, 15@)
10@+=-1.228
11@+=-4.112
12@+=0.798
13@+=1.109
14@+=4.176
15@+=-0.88
if 8339: not anything_in_cube 10@ 11@ 12@ 13@ 14@ 15@ solid 0 car 0 actor 1 object 0 particle 0
then
0209: 1@ = random_int_in_ranges 0 1
if 1@ == 0
then
0376: 2@ = create_random_actor_at 0.0 0.0 0.0
0464: put_actor 2@ into_turret_on_car 0@ at_car_offset -1.142 1.461 0.239 position 1 shooting_angle_limit 0.0 with_weapon 0
0A1A: actor 2@ perform_animation "SEAT_IDLE" IFP_file "PED" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 -1 ms // versionC
0AB1: call_scm_func @SetActorRef 2 2@ 1
end
0209: 1@ = random_int_in_ranges 0 1
if 1@ == 0
then
0376: 2@ = create_random_actor_at 0.0 0.0 0.0
0464: put_actor 2@ into_turret_on_car 0@ at_car_offset -1.142 2.675 0.239 position 1 shooting_angle_limit 0.0 with_weapon 0
0A1A: actor 2@ perform_animation "SEAT_IDLE" IFP_file "PED" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 -1 ms // versionC
0AB1: call_scm_func @SetActorRef 2 2@ 1
end
0209: 1@ = random_int_in_ranges 0 1
if 1@ == 0
then
0376: 2@ = create_random_actor_at 0.0 0.0 0.0
0464: put_actor 2@ into_turret_on_car 0@ at_car_offset -1.142 3.725 0.239 position 1 shooting_angle_limit 0.0 with_weapon 0
0A1A: actor 2@ perform_animation "SEAT_IDLE" IFP_file "PED" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 -1 ms // versionC
0AB1: call_scm_func @SetActorRef 2 2@ 1
end
0209: 1@ = random_int_in_ranges 0 1
if 1@ == 0
then
0376: 2@ = create_random_actor_at 0.0 0.0 0.0
0464: put_actor 2@ into_turret_on_car 0@ at_car_offset 1.177 1.59 0.239 position 3 shooting_angle_limit 0.0 with_weapon 0
0A1A: actor 2@ perform_animation "SEAT_IDLE" IFP_file "PED" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 -1 ms // versionC
0AB1: call_scm_func @SetActorRef 2 2@ 1
end
0209: 1@ = random_int_in_ranges 0 1
if 1@ == 0
then
0376: 2@ = create_random_actor_at 0.0 0.0 0.0
0464: put_actor 2@ into_turret_on_car 0@ at_car_offset 1.177 2.826 0.239 position 3 shooting_angle_limit 0.0 with_weapon 0
0A1A: actor 2@ perform_animation "SEAT_IDLE" IFP_file "PED" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 -1 ms // versionC
0AB1: call_scm_func @SetActorRef 2 2@ 1
end
0209: 1@ = random_int_in_ranges 0 1
if 1@ == 0
then
0376: 2@ = create_random_actor_at 0.0 0.0 0.0
0464: put_actor 2@ into_turret_on_car 0@ at_car_offset 1.177 3.803 0.239 position 3 shooting_angle_limit 0.0 with_weapon 0
0A1A: actor 2@ perform_animation "SEAT_IDLE" IFP_file "PED" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 -1 ms // versionC
0AB1: call_scm_func @SetActorRef 2 2@ 1
end
0209: 1@ = random_int_in_ranges 0 1
if 1@ == 0
then
0376: 2@ = create_random_actor_at 0.0 0.0 0.0
0464: put_actor 2@ into_turret_on_car 0@ at_car_offset -0.398 -2.56 0.239 position 3 shooting_angle_limit 0.0 with_weapon 0
0A1A: actor 2@ perform_animation "SEAT_IDLE" IFP_file "PED" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 -1 ms // versionC
0AB1: call_scm_func @SetActorRef 2 2@ 1
end
0209: 1@ = random_int_in_ranges 0 1
if 1@ == 0
then
0376: 2@ = create_random_actor_at 0.0 0.0 0.0
0464: put_actor 2@ into_turret_on_car 0@ at_car_offset -0.398 -1.555 0.239 position 3 shooting_angle_limit 0.0 with_weapon 0
0A1A: actor 2@ perform_animation "SEAT_IDLE" IFP_file "PED" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 -1 ms // versionC
0AB1: call_scm_func @SetActorRef 2 2@ 1
end
0209: 1@ = random_int_in_ranges 0 1
if 1@ == 0
then
0376: 2@ = create_random_actor_at 0.0 0.0 0.0
0464: put_actor 2@ into_turret_on_car 0@ at_car_offset -0.398 -0.58 0.239 position 3 shooting_angle_limit 0.0 with_weapon 0
0A1A: actor 2@ perform_animation "SEAT_IDLE" IFP_file "PED" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 -1 ms // versionC
0AB1: call_scm_func @SetActorRef 2 2@ 1
end
0209: 1@ = random_int_in_ranges 0 1
if 1@ == 0
then
0376: 2@ = create_random_actor_at 0.0 0.0 0.0
0464: put_actor 2@ into_turret_on_car 0@ at_car_offset 0.437 -2.624 0.239 position 1 shooting_angle_limit 0.0 with_weapon 0
0A1A: actor 2@ perform_animation "SEAT_IDLE" IFP_file "PED" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 -1 ms // versionC
0AB1: call_scm_func @SetActorRef 2 2@ 1
end
0209: 1@ = random_int_in_ranges 0 1
if 1@ == 0
then
0376: 2@ = create_random_actor_at 0.0 0.0 0.0
0464: put_actor 2@ into_turret_on_car 0@ at_car_offset 0.437 -1.539 0.239 position 1 shooting_angle_limit 0.0 with_weapon 0
0A1A: actor 2@ perform_animation "SEAT_IDLE" IFP_file "PED" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 -1 ms // versionC
0AB1: call_scm_func @SetActorRef 2 2@ 1
end
0209: 1@ = random_int_in_ranges 0 1
if 1@ == 0
then
0376: 2@ = create_random_actor_at 0.0 0.0 0.0
0464: put_actor 2@ into_turret_on_car 0@ at_car_offset 0.437 -0.548 0.239 position 1 shooting_angle_limit 0.0 with_weapon 0
0A1A: actor 2@ perform_animation "SEAT_IDLE" IFP_file "PED" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 -1 ms // versionC
0AB1: call_scm_func @SetActorRef 2 2@ 1
end
{else
Car.StorePos(0@, 10@, 11@, 12@)
10@ += -1.142
11@ += 1.461
12@ += 0.239
089E: get_actor_in_sphere 10@ 11@ 12@ radius 0.1 handle_as 2@ // versionB
if 2@>0
then
if Actor.Dead(2@)
then
0465: remove_actor 2@ from_turret_mode
else
if 8611: not actor 2@ performing_animation "SEAT_IDLE"
then
0618: assign_actor 2@ to_AS_pack $8201
end
end
0AB1: call_scm_func @SetActorRef 2 2@ 1
end
Car.StorePos(0@, 10@, 11@, 12@)
10@ += -1.142
11@ += 2.675
12@ += 0.239
089E: get_actor_in_sphere 10@ 11@ 12@ radius 0.1 handle_as 2@ // versionB
if 2@>0
then
if Actor.Dead(2@)
then
0465: remove_actor 2@ from_turret_mode
else
if 8611: not actor 2@ performing_animation "SEAT_IDLE"
then
0618: assign_actor 2@ to_AS_pack $8201
end
end
0AB1: call_scm_func @SetActorRef 2 2@ 1
end
Car.StorePos(0@, 10@, 11@, 12@)
10@ += -1.142
11@ += 3.725
12@ += 0.239
089E: get_actor_in_sphere 10@ 11@ 12@ radius 0.1 handle_as 2@ // versionB
if 2@>0
then
if Actor.Dead(2@)
then
0465: remove_actor 2@ from_turret_mode
else
if 8611: not actor 2@ performing_animation "SEAT_IDLE"
then
0618: assign_actor 2@ to_AS_pack $8201
end
end
0AB1: call_scm_func @SetActorRef 2 2@ 1
end
Car.StorePos(0@, 10@, 11@, 12@)
10@ += 1.177
11@ += 1.59
12@ += 0.239
089E: get_actor_in_sphere 10@ 11@ 12@ radius 0.1 handle_as 2@ // versionB
if 2@>0
then
if Actor.Dead(2@)
then
0465: remove_actor 2@ from_turret_mode
else
if 8611: not actor 2@ performing_animation "SEAT_IDLE"
then
0618: assign_actor 2@ to_AS_pack $8201
end
end
0AB1: call_scm_func @SetActorRef 2 2@ 1
end
Car.StorePos(0@, 10@, 11@, 12@)
10@ += 1.177
11@ += 2.826
12@ += 0.239
089E: get_actor_in_sphere 10@ 11@ 12@ radius 0.1 handle_as 2@ // versionB
if 2@>0
then
if Actor.Dead(2@)
then
0465: remove_actor 2@ from_turret_mode
else
if 8611: not actor 2@ performing_animation "SEAT_IDLE"
then
0618: assign_actor 2@ to_AS_pack $8201
end
end
0AB1: call_scm_func @SetActorRef 2 2@ 1
end
Car.StorePos(0@, 10@, 11@, 12@)
10@ += 1.177
11@ += 3.803
12@ += 0.239
089E: get_actor_in_sphere 10@ 11@ 12@ radius 0.1 handle_as 2@ // versionB
if 2@>0
then
if Actor.Dead(2@)
then
0465: remove_actor 2@ from_turret_mode
else
if 8611: not actor 2@ performing_animation "SEAT_IDLE"
then
0618: assign_actor 2@ to_AS_pack $8201
end
end
0AB1: call_scm_func @SetActorRef 2 2@ 1
end
Car.StorePos(0@, 10@, 11@, 12@)
10@ += -0.398
11@ += -2.56
12@ += 0.239
089E: get_actor_in_sphere 10@ 11@ 12@ radius 0.1 handle_as 2@ // versionB
if 2@>0
then
if Actor.Dead(2@)
then
0465: remove_actor 2@ from_turret_mode
else
if 8611: not actor 2@ performing_animation "SEAT_IDLE"
then
0618: assign_actor 2@ to_AS_pack $8201
end
end
0AB1: call_scm_func @SetActorRef 2 2@ 1
end
Car.StorePos(0@, 10@, 11@, 12@)
10@ += -0.398
11@ += -1.555
12@ += 0.239
089E: get_actor_in_sphere 10@ 11@ 12@ radius 0.1 handle_as 2@ // versionB
if 2@>0
then
if Actor.Dead(2@)
then
0465: remove_actor 2@ from_turret_mode
else
if 8611: not actor 2@ performing_animation "SEAT_IDLE"
then
0618: assign_actor 2@ to_AS_pack $8201
end
end
0AB1: call_scm_func @SetActorRef 2 2@ 1
end
Car.StorePos(0@, 10@, 11@, 12@)
10@ += -0.398
11@ += -0.58
12@ += 0.239
089E: get_actor_in_sphere 10@ 11@ 12@ radius 0.1 handle_as 2@ // versionB
if 2@>0
then
if Actor.Dead(2@)
then
0465: remove_actor 2@ from_turret_mode
else
if 8611: not actor 2@ performing_animation "SEAT_IDLE"
then
0618: assign_actor 2@ to_AS_pack $8201
end
end
0AB1: call_scm_func @SetActorRef 2 2@ 1
end
Car.StorePos(0@, 10@, 11@, 12@)
10@ += 0.437
11@ += -2.624
12@ += 0.239
089E: get_actor_in_sphere 10@ 11@ 12@ radius 0.1 handle_as 2@ // versionB
if 2@>0
then
if Actor.Dead(2@)
then
0465: remove_actor 2@ from_turret_mode
else
if 8611: not actor 2@ performing_animation "SEAT_IDLE"
then
0618: assign_actor 2@ to_AS_pack $8201
end
end
0AB1: call_scm_func @SetActorRef 2 2@ 1
end
Car.StorePos(0@, 10@, 11@, 12@)
10@ += 0.437
11@ += -1.539
12@ += 0.239
089E: get_actor_in_sphere 10@ 11@ 12@ radius 0.1 handle_as 2@ // versionB
if 2@>0
then
if Actor.Dead(2@)
then
0465: remove_actor 2@ from_turret_mode
else
if 8611: not actor 2@ performing_animation "SEAT_IDLE"
then
0618: assign_actor 2@ to_AS_pack $8201
end
end
0AB1: call_scm_func @SetActorRef 2 2@ 1
end
Car.StorePos(0@, 10@, 11@, 12@)
10@ += 0.437
11@ += -0.548
12@ += 0.239
089E: get_actor_in_sphere 10@ 11@ 12@ radius 0.1 handle_as 2@ // versionB
if 2@>0
then
if Actor.Dead(2@)
then
0465: remove_actor 2@ from_turret_mode
else
if 8611: not actor 2@ performing_animation "SEAT_IDLE"
then
0618: assign_actor 2@ to_AS_pack $8201
end
end
0AB1: call_scm_func @SetActorRef 2 2@ 1
end}
end
0AB2: ret 0
:SetActorRef
0A96: 2@ = actor 0@ struct
2@+=0x484
0A8C: write_memory 2@ size 1 value 1@ virtual_protect 0
0AB2: ret 0
:FUNC_GETACTOR
gosub @AIC_GETACTOR
0AB2: ret 1 9@
:FUNC_GETVEHICLE
gosub @AIC_GETVEHICLE
0AB2: ret 1 9@
:FUNC_GETOBJECT
gosub @AIC_GETOBJECT
0AB2: ret 1 9@
:AIC_GETACTOR
0006: 16@ = 305868
0006: 5@ = @AIC_TESTACTORHANDLE
0006: 6@ = 1988
0002: jump @AIC_STARTSEARCH
:AIC_GETVEHICLE
0006: 16@ = 305869
0006: 5@ = @AIC_TESTVEHICLEHANDLE
0006: 6@ = 2584
0006: 8@ = -1
0256: player $PLAYER_CHAR defined
004D: jump_if_false @AIC_STARTSEARCH
00DF: actor $PLAYER_ACTOR driving
004D: jump_if_false @AIC_STARTSEARCH
03C0: 8@ = actor $PLAYER_ACTOR car
0002: jump @AIC_STARTSEARCH
:AIC_GETOBJECT
0006: 16@ = 305871
0006: 5@ = @AIC_TESTOBJECTHANDLE
0006: 6@ = 412
:AIC_STARTSEARCH
008B: 16@ = &0(16@,1i) // CPool*
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 16@ + 8 )^ = 7@ // CPool.Size
0A8D: 11@ = read_memory 16@ size 4 virtual_protect 0 // CPool.pUnits
0006: 9@ = -1
0006: 10@ = 0
:AIC_SEARCHLOOPMAIN
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 11@ + 20 )^ = 4@ // xyz*
8039: not 4@ == 0
004D: jump_if_false @AIC_SEARCHLOOPNEXT
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 4@ + 48 )^ = 12@ // x
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 4@ + 52 )^ = 13@ // y
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 4@ + 56 )^ = 14@ // z
050A: 15@ = distance_between_XYZ 0@ 1@ 2@ and_XYZ 12@ 13@ 14@
0025: 3@ > 15@ // (float)
004D: jump_if_false @AIC_SEARCHLOOPNEXT
0085: 9@ = 10@ // (int) // counter
0AB1: call_scm_func @AIC_READMEMOFFSET 2 ( 16@ + 4 )^ = 4@ // CPool.flags
005A: 4@ += 9@ // (int)
0A8D: 4@ = read_memory 4@ size 1 virtual_protect 0
0012: 9@ *= 256
005A: 9@ += 4@ // (int)
0002: jump 5@
:AIC_TESTVEHICLEHANDLE
056E: is 9@ valid_vehicle_handle
004D: jump_if_false @AIC_NOHANDLE
00D6: if or
003B: 8@ == 9@ // (int)
0119: car 9@ wrecked
004D: jump_if_false @AIC_NEWSEARCHRADIUS
0002: jump @AIC_NOHANDLE
:AIC_TESTACTORHANDLE
056D: is 9@ valid_actor_handle
004D: jump_if_false @AIC_NOHANDLE
00D6: if or
003C: $PLAYER_ACTOR == 9@ // (int)
0118: actor 9@ dead
004D: jump_if_false @AIC_NEWSEARCHRADIUS
0002: jump @AIC_NOHANDLE
:AIC_TESTOBJECTHANDLE
83CA: not object 9@ exists
004D: jump_if_false @AIC_NEWSEARCHRADIUS
:AIC_NOHANDLE
0006: 9@ = -1
0002: jump @AIC_SEARCHLOOPNEXT
:AIC_NEWSEARCHRADIUS
{
use 0051: return to break the loop
immediately when found at least one actor/car/object,
does not matter if he's nearest one.
}
// v EXTRA SEARCH CRITERIA GOES HERE v
{
21@ contains the handle of an actor/car/object
that should be excluded from the search result
(for example a handle found previously).
}
//803B: 21@ <> 9@
//004D: jump_if_false @AIC_NOHANDLE
if 056E: car 9@ defined
then
if 0137: car 9@ model == #TRAM
then
0AB1: call_scm_func @MyFunc 1 9@
end
end
if 03CA: object 9@ exists
then
if 09CC: object 9@ model_is 1281 ; #parktable1
then
0AB1: call_scm_func @MyFunc2 1 9@
end
end
0085: 3@ = 15@
:AIC_SEARCHLOOPNEXT
005A: 11@ += 6@ // (int)
000A: 10@ += 1
002D: 10@ >= 7@ // (int)
004D: jump_if_false @AIC_SEARCHLOOPMAIN
0051: return
:AIC_READMEMOFFSET
0A8E: 0@ = 0@ + 1@ // int
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
0AB2: ret 1 0@Баги:
Если ездят два прицеплённых трамвая, то при повороте с хрустом костей умирают два человека :-0
Людей нельзя убить пулевым оружием, только огнём или взрывом
Чтобы люди появились, иногда нужно подойти к трамваю вплотную из-за известного бага интерцептора (Радиус поиска каждый раз уменьшается)