{$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 @4
0570: 13@ = create_asset_radar_marker_with_icon 8 at x y z // Внутри гаража
03C1: 0@ = player $PLAYER_CHAR car_no_save // получить хендл авто
if 00F7: player $player_char sphere 0 near_point_in_car a b c radius 20.0 20.0 3.0 sphere 0
jf @4
gosub @open // открыть двери гаража
if 00FA: player $player_char stopped_in_sphere 0 near_point_in_car x y z radius 9.0 9.0 3.0
jf @3
gosub @camera // установить камеру
:Check // Проверки
if and
8495: not vehicle 0@ burning
83CE: not car 0@ stuck
8119: not car 0@ wrecked
00DC: player $player_char driving 0@
0256: player $PLAYER_CHAR defined
01C1: car 0@ stopped
jf @3
wait 0
if 0AB0: key_pressed 0x61// 1
then 0AB1: call_scm_func @opcode_0242 2 0@ 1
else
if 0AB0: key_pressed 0x62// 2
then 0AB1: call_scm_func @opcode_0242 2 0@ 2
else
if 0AB0: key_pressed 0x63// 3
then 0AB1: call_scm_func @opcode_0242 2 0@ 3
else
if 0AB0: key_pressed 0x64// 4
then gosub @super_properties
else
if 0AB0: key_pressed 0x65// 5
then 0AB1: call_scm_func @opcode_0228 2 0@ 1
end
end
end
end
end
jump @Check
:3
gosub @open
015A: restore_camera
02EB: restore_camera_with_jumpcut
if or
80F5: not player $player_char in_sphere 0 near_point x y z radius 20.0 20.0 3.0
00F7: player $player_char sphere 0 near_point_in_car a b c radius 30.0 20.0 3.0 sphere 0
jf @3
0ACE: show_formatted_text_box "~w~garage doors are closed."
gosub @cloose
:4
01C3: remove_references_to_car 0@
jump @1
//-------------------------------------------------------------------------------------
// SCM FUNCTIONS:
//-------------------------------------------------------------------------------------
:cloose
0AE3: 3@ = random_object_near_point -836.77 -901.84 15.95 in_radius 5.0 find_next 0 //IF and SET
for 4@ = 1 to 100
034E: move_object 3@ to -836.77 -901.84 12.05 speed 0.0 0.0 0.05 collision_check 0
wait 4
end
return
:open
0AE3: 3@ = random_object_near_point -836.77 -901.84 12.05 in_radius 5.0 find_next 0 //IF and SET
for 4@ = 1 to 100
034E: move_object 3@ to -837.13 -901.67 15.95 speed 0.0 0.0 0.05 collision_check 0
wait 4
end
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@
gosub @cloose
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
:opcode_0228// сборс типа бомбы 0@ (хендл автомобиля) 1@ (тип бомбы)
05E7: 0@ = car 0@ struct
0@ += 0x1FE // car bomb offset
05E0: 0@ = read_memory 0@ size 1 virtual_protect 0
05F9: 0@ = 0@ AND 7
003B: 0@ == 1@ // проверить стадию бомбы в автомобиле
0acd: show_text_high_priority "to remove mine with the car" time 1000
05F6: ret 0
: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 0
: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 0acd: show_text_high_priority "Remote detonation" time 1000
end
end
end
return
:super_properties
053F: set_car 0@ tires_vulnerable 0
02AC: set_car 0@ immunities 1 1 1 1 1
01EC: make_car 0@ very_heavy 1
0acd: show_text_high_priority "super properties are set" time 1000
return
/*
:opcode_02B9// удалить гараж
// 0 @ - входной параметр (дескриптор гаража)
0@ * = 0xA8 // размер каждой структуры гаража
0@ + = 0x812668 // базовый адрес для гаражей
0@ + = 0x5 // смещение активации
05DF: write_memory 0@ size 1 value 1 virtual_protect 0 // деактивировать гараж
05F6: ret 0
// car struct + 0x1FE (byte & 7) - car bomb state
// press 1 for install timed bomb, press 2 for install ignition bomb, press 2 for install detonation bomb.
//0 -0 CARBOMB_NONE Без бомбы
1 CARBOMB_TIMED Неактивная бомба, рассчитанная по времени, может быть получена из гаражного типа 2
2 CARBOMB_ONIGNITION Неактивная зажигательная бомба может быть получена из гаражного типа 3
3 CARBOMB_REMOTE Удаленная детонационная бомба может быть получена из гаражного типа 4
4 CARBOMB_TIMEDACTIVE Активная импульсная бомба, активированная из бомбы типа 1
5 CARBOMB_ONIGNITIONACTIVE Активная зажигательная бомба, активированная из бомбы типа 2
//0219: 15@ = create_garage_type 5 door -836.738 -915.016 9.8 to -836.738 -898.316 13.4 depth -853.238 -905.016
//03DA: set_garage 15@ camera_follows_player
//03CB: set_camera 83.0 -849.8 9.3
// "~h~The ~t~press 1 for install timed bomb,."
// 0AB1: call_scm_func @opcode_0228 2 car_handle 0@ bomb_stage 0 // check if car bomb state == 0
// jf @2 press 2 for install ignition bomb, press 2 for install detonation bomb~x~activated
//0AB1: call_scm_func @opcode_0242 2 car_handle 0@ bomb_type 1 // sets car bomb type 1
//0ACE: show_formatted_text_box