{$CLEO}
const
x = -847.231812 // Координаты внутри гаража
y = -901.642578 // Координаты внутри гаража
z = 11.103406 // Координаты внутри гаража
a = -834.576294 // Координаты гаража
b = -902.218567 // Координаты гаража
c = 11.103406 // Координаты гаража
end
0000:
:1
wait 0
0164: disable_marker 13@ // удалить маркер
if 00E0: player $PLAYER_CHAR driving // за рулем
jf @1
gosub @tag // создать маркер
if 00F7: player $player_char sphere 0 near_point_in_car a b c radius 20.0 20.0 3.0 sphere 0 // на авто около гаража
jf @1
gosub @garage // open
:2
wait 0
if 00F7: player $player_char sphere 0 near_point_in_car a b c radius 30.0 30.0 3.0 sphere 0 // на авто около гаража
jf @5
:3
if 0103: actor $PLAYER_ACTOR in_sphere x y z radius 4.0 4.0 3.0 sphere 0 stopped_in_car //стоп авто внутри гаража
jf @2
gosub @camera // set camera
gosub @garage// закрыть
gosub @Chec // проверки
:6
wait 0
if 80E3: not player $player_char in_sphere 0 near_point a b radius 17.0 17.0
jf @6
:5
gosub @garage// закрыть гараж
if 6@ == 1
jf @1
:7
wait 0
if and
02D8: actor $PLAYER_ACTOR current_weapon == 34
00E1: player 0 pressed_button 17
jf @7
020B: explode_car 5@
01C3: remove_references_to_car 5@
jump @1
:Chec
wait 0
if or
0495: vehicle 5@ burning
03CE: car 5@ stuck
8256: not player $PLAYER_CHAR defined
0119: car 5@ wrecked
80DC: not player $player_char driving 5@
81C1: not car 5@ stopped
jf @Checkes1
gosub @garage
gosub @return_camera
return
:Checkes1
wait 0
if 0AB0: key_pressed 0x61// 1
then 0AB1: call_scm_func @opcode_0242 2 5@ 1 6@
else
if 0AB0: key_pressed 0x62// 2
then 0AB1: call_scm_func @opcode_0242 2 5@ 2 6@
else
if 0AB0: key_pressed 0x63// 3
then 0AB1: call_scm_func @opcode_0242 2 5@ 3 6@
else
if 0AB0: key_pressed 0x64// 4
then gosub @super_properties
else
if 0AB0: key_pressed 0x65// 5
then 0AB1: call_scm_func @opcode_0242 2 5@ 0 6@
end
end
end
end
end
jump @Chec
:opcode_0242 // Установить тип бомбы 0@ (car handle) 1@ (bomb stage)
gosub @text
05E7: 0@ = car 0@ struct
0@ += 0x1FE // car bomb offset
05E0: 2@ = read_memory 0@ size 1 virtual_protect 0 // store previous value
05F9: 1@ = 1@ AND 7 // keep only the first three bits from input param
05F9: 2@ = 2@ AND 0xF8 // exclude the first three bits in stored value
05FA: 2@ = 2@ OR 1@ // replace the first three bits of stored value with input param
05DF: write_memory 0@ size 1 value 2@ virtual_protect 0 // set to new value
05F6: ret 1 15@
:text
if 0039: 1@ == 1 // integer values
then 0acd: show_text_high_priority "Timed detonation" time 1000
else
if 0039: 1@ == 2
then 0acd: show_text_high_priority "Engine ignition detonation" time 1000
else
if 0039: 1@ == 3
then gosub @fun
0acd: show_text_high_priority "Remote detonation" time 1000
15@ = 1
else
if 0039: 1@ == 0
then 0acd: show_text_high_priority "to remove mine with the car" time 1000
end
end
end
end
return
:super_properties
053F: set_car 5@ tires_vulnerable 0
02AC: set_car 5@ immunities 1 1 1 1 1
01EC: make_car 5@ very_heavy 1
0acd: show_text_high_priority "super properties are set" time 1000
return
:fun
repeat
wait 0
Model.Load(#bomb)
038B: load_requested_models
gosub @delay
until Model.Available(#bomb)
01B1: give_player $PLAYER_CHAR weapon 34 ammo 1
Model.Destroy(#bomb)
return
gosub @delay
:delay
16@ = 0
repeat
wait 0
until 0029: 16@ >= 10 // задержка
return
:return_camera
015A: restore_camera
02EB: restore_camera_with_jumpcut
return
:tag
0570: 13@ = create_asset_radar_marker_with_icon 8 at x y z // Внутри гаража
03C1: 5@ = player $PLAYER_CHAR car_no_save // получить хендл авто
return
:garage
0AE3: 0@ = random_object_near_point -836.77 -901.84 12.05 in_radius 4.0 find_next 0 //IF and SET
jf gosub @Check1
01BB: store_object 0@ position_to 1@ 2@ 3@
018D: 4@ = create_sound 2 at 1@ 2@ 3@
wait 0
if 0043: 3@ == 12.03
then
0007: 3@ = 15.95
gosub @Open
else
if 0043: 3@ == 15.95
then
01BB: store_object 0@ position_to 1@ 2@ 3@
0007: 3@ = 12.03
gosub @Open
end
end
return
:Open
while if 84E6: not object 0@ near_point 1@ 2@ 3@ radius 0.01 0.01 0.01 flag 0
wait 0
034E: move_object 0@ to 1@ 2@ 3@ speed 0.0 0.0 0.05 collision_check 0
end
018E: stop_sound 4@
018C: play_sound 5 at 1@ 2@ 3@
018E: stop_sound 4@
return
:Check1
wait 0
return
:camera
015F: set_camera_position -817.4 -905.55 13.86 0.0 rotation 0.0 0.0
0160: point_camera -3982.5 -238.75 63.44 switchstyle 2
0164: disable_marker 13@
0ACE: show_formatted_text_box "~h~~t~The press 1 for install timed bomb~t~ ~h~press 2 for install ignition bomb, ~t~ ~y~ press 3 for install detonation bomb~x~ ~t~~h~press 4 to set super properties car~h~~b~~t~ press 5 to remove mine with the car.~b~ "
return
/*
//0 -0 CARBOMB_NONE Без бомбы
1 CARBOMB_TIMED Неактивная бомба, рассчитанная по времени, может быть получена из гаражного типа 2
2 CARBOMB_ONIGNITION Неактивная зажигательная бомба может быть получена из гаражного типа 3
3 CARBOMB_REMOTE Удаленная детонационная бомба может быть получена из гаражного типа 4
4 CARBOMB_TIMEDACTIVE Активная импульсная бомба, активированная из бомбы типа 1
5 CARBOMB_ONIGNITIONACTIVE Активная зажигательная бомба, активированная из бомбы типа 2