00032. Делаем простой скрипт (приходим к точке и убиваем нужную цель)
Делаем простой скрипт (приходим к точке и убиваем нужную цель)|В этом уроке мы сделаем простой скрипт, что бы когда Карл приходил в нужную точку появлялся Баллас и он начал его атаковать. За убийство он получим 2000$.|wmysterio|wmysterio||||Давайте очистим поток ":MODEL" и в нём установим маркер. Для такого скрипта подойдёт маркер с иконкой. Вот я определил координаты и добавил в скрипт:
1
:MODEL
2
thread 'MODEL'
3
wait 0
4
if
5
056D: actor $PLAYER_ACTOR defined
6
jf @MODEL
7
$ICON = marker.CreateIconAndSphere(15, 2287.793, -1667.109, 15.0317)
Copied!
Дальше нам нужно проверить: "Находится ли игрок в этой точке?". Есть много проверок, но чаще всего используют:
1
00EC: actor $PLAYER_ACTOR 0 near_point 12287.793 -1667.109 radius 3.0 3.0
Copied!
Здесь: $PLAYER_ACTOR - переменная актёра, которого нужно проверить. В нашем случае это CJ 0 - указывает на необходимость игре рисовать ещё и сферу с этой точке. Если 1 - рисовать сферу. 0 - не рисовать 12287.793 -1667.109 - координаты точки по оси X и Y 3.0 3.0 - радиус ширины и высоты
Таким образом проверка должна быть примерно такой:
1
:MODEL_1
2
wait 0
3
if
4
00EC: actor $PLAYER_ACTOR 0 near_point 2287.793 -1667.109 radius 15.0317 3.0
5
jf @MODEL_1
Copied!
Дальше, когда проверка сработает, нам нужно будет отключить маркер и создать Балласа. Строим скрипт дальше ( после jf ) :
1
marker.Disable($ICON)
2
model.Load(#BALLAS1)
3
038B: load_requested_models
4
5
:MODEL_2
6
wait 0
7
if
8
model.Available(#BALLAS1)
9
jf @MODEL_2
10
$BALLAS = actor.Create(7, #BALLAS1, 2285.6228, -1680.5663, 13.1829)
11
actor.Angle($BALLAS) = 357.4442
12
actor.Health($BALLAS) = 300
13
model.Destroy(#BALLAS1)
14
077A: set_actor $BALLAS acquaintance 4 to_actors_pedtype 0
Copied!
Последний опкод указывает "отношение нашего Балласа к СЖ". В данном случаи он будет ненавидеть его. Но это не значит, что он кинется убивать его. Мы программно заставим его сделать это. Также поставим маркер над ним. Пишем дальше скрипт:
1
07E0: set_marker $MARKER type_to 0
2
0168: set_marker $MARKER size 2
3
05E2: AS_actor $BALLAS kill_actor $PLAYER_ACTOR
Copied!
Ниже по скрипту пишем удаление нашего Балласа. Но использовать мы будем это через "gosub". Вот примерный кусок скрипта:
1
:MODEL_3
2
wait 0
3
if
4
075C: marker $MARKER enabled
5
then
6
marker.Disable($MARKER)
7
end
8
if
9
actor.Defined($BALLAS)
10
then
11
actor.RemoveReferences($BALLAS)
12
actor.DestroyInstantly($BALLAS)
13
end
14
return
Copied!
Этот блок сначала проверит на существование маркера. Если тот существует, то отключаем его. Потом проверяем на существование актёра Балласа. Если он существует, то стираем все сведения о нём и удаляем. Дальше идёт слово "return". Это значит, что этот блок будет возвращаться куда то. В нашем случаи такой кусок скрипта отлично подойдёт при убийстве СЖ а так же при убийстве Балласа. Мы будем использовать этот блок в зависимости от того, кто кого победил.
Перейдём выше, вплоть до опкода 05E2. Дальше нам необходимо сделать цикл до тех пор, пока кто то не победит. Напишем такое:
1
:MODEL_4
2
wait 0
3
4
jump @MODEL_4
Copied!
Это будет наш самый простой цикл. В нём напишем два условия. Первый: проверку на убийство СЖ:
1
if or
2
actor.Dead($PLAYER_ACTOR)
3
0741: actor $PLAYER_ACTOR busted
4
then
5
gosub @MODEL_3
6
jump @MODEL
7
end
Copied!
Таким образом если СЖ убьют или арестуют ( опкод 0741 проверяет: "арестован ли актёр?" ) мы делаем прыжок на метку "@MODEL_3" с последующим возвратом. Это мы сделали для того, что бы очистить игру от Балласа и от маркера над ним. После этого идёт прыжок на начало скрипта, то есть опять создаётся маркер СЖ и снова будет проверка: "Игрок находится в точке XY". Если мы станим на маркер, опять появится Баллас и так дальше, пока Баллас не будет убит. Но если мы его убьем ничего не произойдёт, так как мы не проверили его на убийство. Создадим метку ":MODEL_5" после цикла. После этого пишем условие, которое будет похожее на предыдущее:
1
if
2
actor.Dead($BALLAS)
3
then
4
gosub @MODEL_3
5
jump @MODEL_4
6
end
Copied!
Теперь скрипт должен работать! Всё что нам осталось, это дать денег игроку. Сделаем это:
1
:MODEL_5
2
wait 0
3
Player.Money($PLAYER_CHAR) += 2000
4
0394: play_music 1
5
end_thread
Copied!
Эта команда даёт возможность дать денег игроку:
1
Player.Money($PLAYER_CHAR) += 2000
Copied!
× **Примечание:** Мы может только прибавлять деньги, что бы отнять деньги нужно возле числа 2000 поставить минус, что бы было "-2000". Тогда деньги будут забираться
Команда позволяет проиграть звук, который идентичный тому, что играет после прохождения миссий в оригинальном main.scm:
1
0394: play_music 1
Copied!
Давайте сложим всё написанное в одно. У меня получилось такое:
1
:MODEL
2
thread 'MODEL'
3
wait 0
4
if
5
056D: actor $PLAYER_ACTOR defined
6
jf @MODEL
7
$ICON = marker.CreateIconAndSphere(15, 2287.793, -1667.109, 15.0317)
8
9
:MODEL_1
10
wait 0
11
if
12
00EC: actor $PLAYER_ACTOR 0 near_point 2287.793 -1667.109 radius 3.0 3.0
13
jf @MODEL_1
14
marker.Disable($ICON)
15
model.Load(#BALLAS1)
16
038B: load_requested_models
17
18
:MODEL_2
19
wait 0
20
if
21
model.Available(#BALLAS1)
22
jf @MODEL_2
23
$BALLAS = actor.Create(7, #BALLAS1, 2285.6228, -1680.5663, 13.1829)
24
actor.Angle($BALLAS) = 357.4442
25
actor.Health($BALLAS) = 300
26
model.Destroy(#BALLAS1)
27
077A: set_actor $BALLAS acquaintance 4 to_actors_pedtype 0 // see ped.dat
28
$MARKER = marker.CreateAboveActor($BALLAS)
29
07E0: set_marker $MARKER type_to 0
30
0168: set_marker $MARKER size 2
31
05E2: AS_actor $BALLAS kill_actor $PLAYER_ACTOR
32
33
:MODEL_4
34
wait 0
35
if OR
36
actor.Dead($PLAYER_ACTOR)
37
0741: actor $PLAYER_ACTOR busted
38
then
39
gosub @MODEL_3
40
jump @MODEL
41
end
42
if
43
actor.Dead($BALLAS)
44
then
45
gosub @MODEL_3
46
jump @MODEL_5
47
end
48
jump @MODEL_4
49
50
:MODEL_5
51
wait 0
52
Player.Money($PLAYER_CHAR) += 2000
53
0394: play_music 1
54
end_thread
55
56
:MODEL_3
57
wait 0
58
if
59
075C: marker $MARKER enabled
60
then
61
marker.Disable($MARKER)
62
end
63
if
64
056D: actor $BALLAS defined
65
then
66
actor.RemoveReferences($BALLAS)
67
actor.DestroyInstantly($BALLAS)
68
end
69
return
Copied!
Весь main у меня содержит такой текст:
1
// WMYSTERIO, ru-script.3dn.ru
2
DEFINE OBJECTS 1
3
DEFINE OBJECT SANNY BUILDER 3.04
4
5
DEFINE MISSIONS 0
6
7
DEFINE EXTERNAL_SCRIPTS 0
8
9
DEFINE UNKNOWN_EMPTY_SEGMENT 0
10
11
DEFINE UNKNOWN_THREADS_MEMORY 3072
12
13
{$VERSION 3.1.0027}
14
15
//-------------MAIN---------------
16
thread 'MAIN'
17
set_wb_check_to 0
18
set_weather 0
19
select_interior 0
20
fade 0 0
21
0180: set_on_mission_flag_to $ONMISSION
22
00C0: set_current_time_hours_to 8 minutes_to 0
23
04E4: unknown_refresh_game_renderer_at 2491.1572 -1670.3434
24
Camera.SetAtPos(2491.1572, -1670.3434, 12.3359)
25
$PLAYER_CHAR = Player.Create(#NULL, 2491.1572, -1670.3434, 12.3359)
26
$PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)
27
Actor.Angle($PLAYER_ACTOR) = 66.3548
28
07AF: $PLAYER_GROUP = player $PLAYER_CHAR group
29
Camera.SetBehindPlayer
30
Player.SetClothes($PLAYER_CHAR, "WORKTRCAMOGRN", "WORKTR", 2)
31
Player.SetClothes($PLAYER_CHAR, "SNEAKERBINCGANG", "SNEAKER", 3)
32
Player.SetClothes($PLAYER_CHAR, "TSHIRTERISORN", "TSHIRT", 0)
33
Player.Build($PLAYER_CHAR)
34
Player.CanMove($PLAYER_CHAR) = True
35
$TRAMPLIN = object.Create(#AD_JUMP, 2480.5842, -1721.8175, 12.5488)
36
object.Angle($TRAMPLIN) = 180.0
37
object.SetImmunities($TRAMPLIN, 1, 1, 1, 1, 1)
38
Object.Indestructibility($TRAMPLIN) = False
39
Object.RemoveFromMissionCleanupList($TRAMPLIN)
40
0879: enable_gang_wars 1
41
076C: set_zone 'GAN1' gang 1 density_to 40
42
076C: set_zone 'GAN2' gang 1 density_to 80
43
076C: set_zone 'IWD1' gang 0 density_to 40
44
076C: set_zone 'IWD2' gang 0 density_to 80
45
076C: set_zone 'IWD3A' gang 2 density_to 40
46
076C: set_zone 'IWD3B' gang 2 density_to 80
47
0237: set_gang 0 weapons_to 22 31 14
48
0237: set_gang 1 weapons_to 30 28 17
49
0237: set_gang 2 weapons_to 36 15 27
50
0746: set_acquaintance 4 of_actors_pedtype 7 to_actors_pedtype 6
51
0746: set_acquaintance 4 of_actors_pedtype 8 to_actors_pedtype 6
52
0746: set_acquaintance 4 of_actors_pedtype 9 to_actors_pedtype 6
53
0746: set_acquaintance 4 of_actors_pedtype 6 to_actors_pedtype 7
54
0746: set_acquaintance 4 of_actors_pedtype 6 to_actors_pedtype 8
55
0746: set_acquaintance 4 of_actors_pedtype 6 to_actors_pedtype 9
56
0746: set_acquaintance 4 of_actors_pedtype 7 to_actors_pedtype 8
57
0746: set_acquaintance 4 of_actors_pedtype 7 to_actors_pedtype 9
58
0746: set_acquaintance 4 of_actors_pedtype 8 to_actors_pedtype 7
59
0746: set_acquaintance 4 of_actors_pedtype 8 to_actors_pedtype 9
60
0746: set_acquaintance 4 of_actors_pedtype 9 to_actors_pedtype 7
61
0746: set_acquaintance 4 of_actors_pedtype 9 to_actors_pedtype 8
62
0746: set_acquaintance 4 of_actors_pedtype 7 to_actors_pedtype 0
63
0746: set_acquaintance 0 of_actors_pedtype 8 to_actors_pedtype 0
64
0746: set_acquaintance 4 of_actors_pedtype 9 to_actors_pedtype 0
65
0767: set_zone 'MARKST' popcycle_group_for_peds_and_cars_to 14
66
0767: set_zone 'UNITY' popcycle_group_for_peds_and_cars_to 5
67
0767: set_zone 'LAIR1' popcycle_group_for_peds_and_cars_to 16
68
0767: set_zone 'LAIR2A' popcycle_group_for_peds_and_cars_to 16
69
0767: set_zone 'LAIR2B' popcycle_group_for_peds_and_cars_to 16
70
0767: set_zone 'LBAG1' popcycle_group_for_peds_and_cars_to 19
71
0767: set_zone 'LBAG2' popcycle_group_for_peds_and_cars_to 19
72
0767: set_zone 'LBAG3' popcycle_group_for_peds_and_cars_to 19
73
0767: set_zone 'BLUF1A' popcycle_group_for_peds_and_cars_to 10
74
0767: set_zone 'BLUF2' popcycle_group_for_peds_and_cars_to 10
75
0767: set_zone 'SUN1' popcycle_group_for_peds_and_cars_to 2
76
0767: set_zone 'SUN1' popcycle_group_for_peds_and_cars_to 2
77
0767: set_zone 'SUN3A' popcycle_group_for_peds_and_cars_to 2
78
0767: set_zone 'SUN3B' popcycle_group_for_peds_and_cars_to 2
79
0767: set_zone 'SUN3C' popcycle_group_for_peds_and_cars_to 2
80
0767: set_zone 'SUN4' popcycle_group_for_peds_and_cars_to 2
81
0767: set_zone 'COM1A' popcycle_group_for_peds_and_cars_to 9
82
0767: set_zone 'COM1B' popcycle_group_for_peds_and_cars_to 9
83
0767: set_zone 'COM2' popcycle_group_for_peds_and_cars_to 9
84
0767: set_zone 'COM3' popcycle_group_for_peds_and_cars_to 9
85
0767: set_zone 'COM4' popcycle_group_for_peds_and_cars_to 9
86
0767: set_zone 'PER1' popcycle_group_for_peds_and_cars_to 9
87
0767: set_zone 'CHC1A' popcycle_group_for_peds_and_cars_to 6
88
0767: set_zone 'CHC1B' popcycle_group_for_peds_and_cars_to 6
89
0767: set_zone 'CHC2A' popcycle_group_for_peds_and_cars_to 6
90
0767: set_zone 'CHC2B' popcycle_group_for_peds_and_cars_to 6
91
0767: set_zone 'CHC3' popcycle_group_for_peds_and_cars_to 7
92
0767: set_zone 'CHC4A' popcycle_group_for_peds_and_cars_to 7
93
0767: set_zone 'CHC4B' popcycle_group_for_peds_and_cars_to 7
94
0874: set_zone 'CHC1A' popcycle_group_for_peds_to 9
95
0874: set_zone 'CHC1B' popcycle_group_for_peds_to 9
96
0874: set_zone 'CHC2A' popcycle_group_for_peds_to 9
97
0874: set_zone 'CHC2B' popcycle_group_for_peds_to 9
98
0874: set_zone 'CHC3' popcycle_group_for_peds_to 9
99
0874: set_zone 'CHC4A' popcycle_group_for_peds_to 9
100
0874: set_zone 'CHC4B' popcycle_group_for_peds_to 9
101
0767: set_zone 'CONF1A' popcycle_group_for_peds_and_cars_to 0
102
0767: set_zone 'CONF1B' popcycle_group_for_peds_and_cars_to 0
103
0767: set_zone 'THALL1' popcycle_group_for_peds_and_cars_to 0
104
0767: set_zone 'LDOC1A' popcycle_group_for_peds_and_cars_to 11
105
0767: set_zone 'LDOC1B' popcycle_group_for_peds_and_cars_to 11
106
0767: set_zone 'LDOC2' popcycle_group_for_peds_and_cars_to 11
107
0767: set_zone 'LDOC3A' popcycle_group_for_peds_and_cars_to 11
108
0767: set_zone 'LDOC3B' popcycle_group_for_peds_and_cars_to 11
109
0767: set_zone 'LDOC3C' popcycle_group_for_peds_and_cars_to 11
110
0767: set_zone 'LDOC4' popcycle_group_for_peds_and_cars_to 11
111
0767: set_zone 'LDT1A' popcycle_group_for_peds_and_cars_to 0
112
0767: set_zone 'LDT1B' popcycle_group_for_peds_and_cars_to 0
113
0767: set_zone 'LDT1C' popcycle_group_for_peds_and_cars_to 0
114
0767: set_zone 'LDT3' popcycle_group_for_peds_and_cars_to 0
115
0767: set_zone 'LDT4' popcycle_group_for_peds_and_cars_to 5
116
0767: set_zone 'LDT5' popcycle_group_for_peds_and_cars_to 0
117
0767: set_zone 'LDT6' popcycle_group_for_peds_and_cars_to 0
118
0767: set_zone 'LDT7' popcycle_group_for_peds_and_cars_to 5
119
0767: set_zone 'EBE1' popcycle_group_for_peds_and_cars_to 5
120
0767: set_zone 'EBE2A' popcycle_group_for_peds_and_cars_to 5
121
0767: set_zone 'EBE2B' popcycle_group_for_peds_and_cars_to 5
122
0767: set_zone 'EBE3C' popcycle_group_for_peds_and_cars_to 8
123
0767: set_zone 'ELCO1' popcycle_group_for_peds_and_cars_to 6
124
0767: set_zone 'ELCO2' popcycle_group_for_peds_and_cars_to 7
125
0874: set_zone 'ELCO1' popcycle_group_for_peds_to 9
126
0874: set_zone 'ELCO2' popcycle_group_for_peds_to 9
127
0767: set_zone 'GAN1' popcycle_group_for_peds_and_cars_to 7
128
0767: set_zone 'GAN2' popcycle_group_for_peds_and_cars_to 7
129
0874: set_zone 'GAN1' popcycle_group_for_peds_to 1
130
0874: set_zone 'GAN2' popcycle_group_for_peds_to 1
131
0767: set_zone 'GLN1' popcycle_group_for_peds_and_cars_to 7
132
0767: set_zone 'GLN2A' popcycle_group_for_peds_and_cars_to 7
133
0767: set_zone 'LIND1A' popcycle_group_for_peds_and_cars_to 7
134
0767: set_zone 'LIND1B' popcycle_group_for_peds_and_cars_to 11
135
0767: set_zone 'LIND2A' popcycle_group_for_peds_and_cars_to 11
136
0767: set_zone 'LIND2B' popcycle_group_for_peds_and_cars_to 11
137
0767: set_zone 'LIND3' popcycle_group_for_peds_and_cars_to 11
138
0767: set_zone 'IWD1' popcycle_group_for_peds_and_cars_to 7
139
0767: set_zone 'IWD2' popcycle_group_for_peds_and_cars_to 7
140
0767: set_zone 'IWD3A' popcycle_group_for_peds_and_cars_to 7
141
0767: set_zone 'IWD3B' popcycle_group_for_peds_and_cars_to 7
142
0767: set_zone 'IWD4' popcycle_group_for_peds_and_cars_to 7
143
0767: set_zone 'IWD5' popcycle_group_for_peds_and_cars_to 7
144
0874: set_zone 'IWD1' popcycle_group_for_peds_to 1
145
0874: set_zone 'IWD2' popcycle_group_for_peds_to 1
146
0874: set_zone 'IWD3A' popcycle_group_for_peds_to 1
147
0874: set_zone 'IWD3B' popcycle_group_for_peds_to 1
148
0874: set_zone 'IWD4' popcycle_group_for_peds_to 1
149
0874: set_zone 'IWD5' popcycle_group_for_peds_to 1
150
0767: set_zone 'JEF1A' popcycle_group_for_peds_and_cars_to 5
151
0767: set_zone 'JEF1B' popcycle_group_for_peds_and_cars_to 5
152
0767: set_zone 'JEF2' popcycle_group_for_peds_and_cars_to 5
153
0767: set_zone 'JEF3A' popcycle_group_for_peds_and_cars_to 5
154
0767: set_zone 'JEF3B' popcycle_group_for_peds_and_cars_to 5
155
0767: set_zone 'JEF3C' popcycle_group_for_peds_and_cars_to 5
156
0767: set_zone 'LFL1A' popcycle_group_for_peds_and_cars_to 7
157
0767: set_zone 'LFL1B' popcycle_group_for_peds_and_cars_to 7
158
0874: set_zone 'LFL1A' popcycle_group_for_peds_to 9
159
0874: set_zone 'LFL1B' popcycle_group_for_peds_to 9
160
0767: set_zone 'LMEX1A' popcycle_group_for_peds_and_cars_to 5
161
0767: set_zone 'LMEX1B' popcycle_group_for_peds_and_cars_to 5
162
0767: set_zone 'ELS1A' popcycle_group_for_peds_and_cars_to 7
163
0767: set_zone 'ELS1B' popcycle_group_for_peds_and_cars_to 7
164
0767: set_zone 'ELS2' popcycle_group_for_peds_and_cars_to 7
165
0767: set_zone 'ELS3A' popcycle_group_for_peds_and_cars_to 7
166
0767: set_zone 'ELS3B' popcycle_group_for_peds_and_cars_to 7
167
0767: set_zone 'ELS4' popcycle_group_for_peds_and_cars_to 7
168
0874: set_zone 'ELS1A' popcycle_group_for_peds_to 10
169
0874: set_zone 'ELS1B' popcycle_group_for_peds_to 10
170
0874: set_zone 'ELS2' popcycle_group_for_peds_to 10
171
0874: set_zone 'ELS3A' popcycle_group_for_peds_to 10
172
0874: set_zone 'ELS3B' popcycle_group_for_peds_to 10
173
0874: set_zone 'ELS4' popcycle_group_for_peds_to 10
174
0767: set_zone 'MAR1' popcycle_group_for_peds_and_cars_to 4
175
0767: set_zone 'MAR2' popcycle_group_for_peds_and_cars_to 5
176
0767: set_zone 'MAR3' popcycle_group_for_peds_and_cars_to 5
177
0767: set_zone 'MKT1' popcycle_group_for_peds_and_cars_to 14
178
0767: set_zone 'MKT2' popcycle_group_for_peds_and_cars_to 14
179
0767: set_zone 'MKT3' popcycle_group_for_peds_and_cars_to 14
180
0767: set_zone 'MKT4' popcycle_group_for_peds_and_cars_to 14
181
0767: set_zone 'MUL1A' popcycle_group_for_peds_and_cars_to 15
182
0767: set_zone 'MUL1B' popcycle_group_for_peds_and_cars_to 15
183
0767: set_zone 'MUL1C' popcycle_group_for_peds_and_cars_to 15
184
0767: set_zone 'MUL2A' popcycle_group_for_peds_and_cars_to 10
185
0767: set_zone 'MUL2B' popcycle_group_for_peds_and_cars_to 10
186
0767: set_zone 'MUL3' popcycle_group_for_peds_and_cars_to 10
187
0767: set_zone 'MUL4' popcycle_group_for_peds_and_cars_to 15
188
0767: set_zone 'MUL5A' popcycle_group_for_peds_and_cars_to 15
189
0767: set_zone 'MUL5B' popcycle_group_for_peds_and_cars_to 15
190
0767: set_zone 'MUL5C' popcycle_group_for_peds_and_cars_to 15
191
0767: set_zone 'MUL6' popcycle_group_for_peds_and_cars_to 15
192
0767: set_zone 'MUL7A' popcycle_group_for_peds_and_cars_to 15
193
0767: set_zone 'MUL7B' popcycle_group_for_peds_and_cars_to 15
194
0767: set_zone 'PLS' popcycle_group_for_peds_and_cars_to 8
195
0767: set_zone 'RIH1A' popcycle_group_for_peds_and_cars_to 15
196
0767: set_zone 'RIH1B' popcycle_group_for_peds_and_cars_to 15
197
0767: set_zone 'RIH2' popcycle_group_for_peds_and_cars_to 15
198
0767: set_zone 'RIH3A' popcycle_group_for_peds_and_cars_to 15
199
0767: set_zone 'RIH3B' popcycle_group_for_peds_and_cars_to 15
200
0767: set_zone 'RIH4' popcycle_group_for_peds_and_cars_to 4
201
0767: set_zone 'RIH5A' popcycle_group_for_peds_and_cars_to 4
202
0767: set_zone 'RIH6B' popcycle_group_for_peds_and_cars_to 4
203
0767: set_zone 'RIH5A' popcycle_group_for_peds_and_cars_to 4
204
0767: set_zone 'RIH6B' popcycle_group_for_peds_and_cars_to 4
205
0767: set_zone 'ROD1A' popcycle_group_for_peds_and_cars_to 14
206
0767: set_zone 'ROD1B' popcycle_group_for_peds_and_cars_to 14
207
0767: set_zone 'ROD1C' popcycle_group_for_peds_and_cars_to 14
208
0767: set_zone 'ROD2A' popcycle_group_for_peds_and_cars_to 14
209
0767: set_zone 'ROD2B' popcycle_group_for_peds_and_cars_to 14
210
0767: set_zone 'ROD3A' popcycle_group_for_peds_and_cars_to 14
211
0767: set_zone 'ROD3B' popcycle_group_for_peds_and_cars_to 14
212
0767: set_zone 'ROD4A' popcycle_group_for_peds_and_cars_to 14
213
0767: set_zone 'ROD4B' popcycle_group_for_peds_and_cars_to 14
214
0767: set_zone 'ROD4C' popcycle_group_for_peds_and_cars_to 14
215
0767: set_zone 'ROD5A' popcycle_group_for_peds_and_cars_to 4
216
0767: set_zone 'ROD5B' popcycle_group_for_peds_and_cars_to 4
217
0767: set_zone 'SMB1' popcycle_group_for_peds_and_cars_to 8
218
0767: set_zone 'SMB2' popcycle_group_for_peds_and_cars_to 8
219
0767: set_zone 'VIN2' popcycle_group_for_peds_and_cars_to 2
220
0767: set_zone 'VIN3' popcycle_group_for_peds_and_cars_to 2
221
0767: set_zone 'VIN1A' popcycle_group_for_peds_and_cars_to 2
222
0767: set_zone 'VIN1B' popcycle_group_for_peds_and_cars_to 2
223
0767: set_zone 'VERO1' popcycle_group_for_peds_and_cars_to 5
224
0767: set_zone 'VERO2' popcycle_group_for_peds_and_cars_to 9
225
0767: set_zone 'VERO3' popcycle_group_for_peds_and_cars_to 9
226
0767: set_zone 'VERO4A' popcycle_group_for_peds_and_cars_to 8
227
0767: set_zone 'VERO4B' popcycle_group_for_peds_and_cars_to 8
228
0767: set_zone 'CRANB' popcycle_group_for_peds_and_cars_to 5
229
0767: set_zone 'CALT' popcycle_group_for_peds_and_cars_to 5
230
0767: set_zone 'SUNMA' popcycle_group_for_peds_and_cars_to 4
231
0767: set_zone 'SUNNN' popcycle_group_for_peds_and_cars_to 5
232
0767: set_zone 'BATTP' popcycle_group_for_peds_and_cars_to 2
233
0767: set_zone 'ESPN1' popcycle_group_for_peds_and_cars_to 9
234
0767: set_zone 'ESPN2' popcycle_group_for_peds_and_cars_to 9
235
0767: set_zone 'ESPN3' popcycle_group_for_peds_and_cars_to 9
236
0767: set_zone 'BAYV' popcycle_group_for_peds_and_cars_to 5
237
0767: set_zone 'PARA' popcycle_group_for_peds_and_cars_to 4
238
0767: set_zone 'JUNIHO' popcycle_group_for_peds_and_cars_to 5
239
0767: set_zone 'JUNIHI' popcycle_group_for_peds_and_cars_to 5
240
0767: set_zone 'CIVI' popcycle_group_for_peds_and_cars_to 5
241
0767: set_zone 'CHINA' popcycle_group_for_peds_and_cars_to 9
242
0874: set_zone 'CHINA' popcycle_group_for_peds_to 6
243
0767: set_zone 'SFDWT1' popcycle_group_for_peds_and_cars_to 0
244
0767: set_zone 'SFDWT2' popcycle_group_for_peds_and_cars_to 0
245
0767: set_zone 'SFDWT3' popcycle_group_for_peds_and_cars_to 0
246
0767: set_zone 'SFDWT4' popcycle_group_for_peds_and_cars_to 9
247
0767: set_zone 'SFDWT5' popcycle_group_for_peds_and_cars_to 9
248
0767: set_zone 'SFDWT6' popcycle_group_for_peds_and_cars_to 9
249
0767: set_zone 'FINA' popcycle_group_for_peds_and_cars_to 0
250
0767: set_zone 'CITYS' popcycle_group_for_peds_and_cars_to 0
251
0767: set_zone 'WESTP1' popcycle_group_for_peds_and_cars_to 4
252
0767: set_zone 'WESTP2' popcycle_group_for_peds_and_cars_to 4
253
0767: set_zone 'WESTP3' popcycle_group_for_peds_and_cars_to 4
254
0767: set_zone 'THEA1' popcycle_group_for_peds_and_cars_to 2
255
0767: set_zone 'THEA2' popcycle_group_for_peds_and_cars_to 2
256
0767: set_zone 'THEA3' popcycle_group_for_peds_and_cars_to 2
257
0767: set_zone 'GARC' popcycle_group_for_peds_and_cars_to 7
258
0767: set_zone 'HASH' popcycle_group_for_peds_and_cars_to 6
259
0767: set_zone 'OCEAF1' popcycle_group_for_peds_and_cars_to 8
260
0767: set_zone 'OCEAF2' popcycle_group_for_peds_and_cars_to 5
261
0767: set_zone 'OCEAF3' popcycle_group_for_peds_and_cars_to 8
262
0767: set_zone 'DOH1' popcycle_group_for_peds_and_cars_to 5
263
0767: set_zone 'DOH2' popcycle_group_for_peds_and_cars_to 5
264
0767: set_zone 'CUNTC1' popcycle_group_for_peds_and_cars_to 4
265
0767: set_zone 'CUNTC2' popcycle_group_for_peds_and_cars_to 4
266
0767: set_zone 'CUNTC3' popcycle_group_for_peds_and_cars_to 4
267
0767: set_zone 'SFGLF1' popcycle_group_for_peds_and_cars_to 17
268
0767: set_zone 'SFGLF2' popcycle_group_for_peds_and_cars_to 17
269
0767: set_zone 'SFGLF3' popcycle_group_for_peds_and_cars_to 17
270
0767: set_zone 'SFGLF4' popcycle_group_for_peds_and_cars_to 17
271
0767: set_zone 'HILLP' popcycle_group_for_peds_and_cars_to 10
272
0767: set_zone 'SILLY1' popcycle_group_for_peds_and_cars_to 0
273
0767: set_zone 'SILLY2' popcycle_group_for_peds_and_cars_to 0
274
0767: set_zone 'SILLY3' popcycle_group_for_peds_and_cars_to 0
275
0767: set_zone 'SILLY4' popcycle_group_for_peds_and_cars_to 0
276
0767: set_zone 'SFAIR1' popcycle_group_for_peds_and_cars_to 16
277
0767: set_zone 'SFAIR2' popcycle_group_for_peds_and_cars_to 16
278
0767: set_zone 'SFAIR3' popcycle_group_for_peds_and_cars_to 16
279
0767: set_zone 'SFAIR4' popcycle_group_for_peds_and_cars_to 16
280
0767: set_zone 'SFAIR5' popcycle_group_for_peds_and_cars_to 16
281
0767: set_zone 'SFBAG1' popcycle_group_for_peds_and_cars_to 19
282
0767: set_zone 'SFBAG2' popcycle_group_for_peds_and_cars_to 19
283
0767: set_zone 'SFBAG3' popcycle_group_for_peds_and_cars_to 19
284
0767: set_zone 'EASB1' popcycle_group_for_peds_and_cars_to 11
285
0767: set_zone 'EASB2' popcycle_group_for_peds_and_cars_to 11
286
0767: set_zone 'ESPE1' popcycle_group_for_peds_and_cars_to 9
287
0767: set_zone 'ESPE2' popcycle_group_for_peds_and_cars_to 9
288
0767: set_zone 'ESPE3' popcycle_group_for_peds_and_cars_to 9
289
0767: set_zone 'LINDEN' popcycle_group_for_peds_and_cars_to 5
290
0767: set_zone 'YELLOW' popcycle_group_for_peds_and_cars_to 4
291
0767: set_zone 'BFC1' popcycle_group_for_peds_and_cars_to 5
292
0767: set_zone 'BFC2' popcycle_group_for_peds_and_cars_to 5
293
0767: set_zone 'RIE' popcycle_group_for_peds_and_cars_to 0
294
0767: set_zone 'LDM' popcycle_group_for_peds_and_cars_to 6
295
0767: set_zone 'RSW1' popcycle_group_for_peds_and_cars_to 6
296
0767: set_zone 'RSW2' popcycle_group_for_peds_and_cars_to 6
297
0767: set_zone 'RSE' popcycle_group_for_peds_and_cars_to 6
298
0767: set_zone 'LDS' popcycle_group_for_peds_and_cars_to 11
299
0767: set_zone 'SRY' popcycle_group_for_peds_and_cars_to 5
300
0767: set_zone 'JTS1' popcycle_group_for_peds_and_cars_to 5
301
0767: set_zone 'JTS2' popcycle_group_for_peds_and_cars_to 5
302
0767: set_zone 'LVA1' popcycle_group_for_peds_and_cars_to 11
303
0767: set_zone 'LVA2' popcycle_group_for_peds_and_cars_to 18
304
0767: set_zone 'LVA3' popcycle_group_for_peds_and_cars_to 11
305
0767: set_zone 'LVA4' popcycle_group_for_peds_and_cars_to 11
306
0767: set_zone 'VAIR1' popcycle_group_for_peds_and_cars_to 16
307
0767: set_zone 'VAIR2' popcycle_group_for_peds_and_cars_to 16
308
0767: set_zone 'VAIR3' popcycle_group_for_peds_and_cars_to 16
309
0767: set_zone 'LVBAG' popcycle_group_for_peds_and_cars_to 19
310
0767: set_zone 'GGC1' popcycle_group_for_peds_and_cars_to 10
311
0767: set_zone 'GGC2' popcycle_group_for_peds_and_cars_to 2
312
0767: set_zone 'BFLD1' popcycle_group_for_peds_and_cars_to 10
313
0767: set_zone 'BFLD2' popcycle_group_for_peds_and_cars_to 2
314
0767: set_zone 'WWE' popcycle_group_for_peds_and_cars_to 5
315
0767: set_zone 'WWE1' popcycle_group_for_peds_and_cars_to 5
316
0767: set_zone 'PINT' popcycle_group_for_peds_and_cars_to 5
317
0767: set_zone 'YBELL2' popcycle_group_for_peds_and_cars_to 4
318
0767: set_zone 'YBELL1' popcycle_group_for_peds_and_cars_to 17
319
0767: set_zone 'JTW1' popcycle_group_for_peds_and_cars_to 5
320
0767: set_zone 'JTW2' popcycle_group_for_peds_and_cars_to 5
321
0767: set_zone 'JTN1' popcycle_group_for_peds_and_cars_to 5
322
0767: set_zone 'JTN2' popcycle_group_for_peds_and_cars_to 5
323
0767: set_zone 'JTN3' popcycle_group_for_peds_and_cars_to 5
324
0767: set_zone 'JTN4' popcycle_group_for_peds_and_cars_to 5
325
0767: set_zone 'JTN5' popcycle_group_for_peds_and_cars_to 5
326
0767: set_zone 'JTN6' popcycle_group_for_peds_and_cars_to 5
327
0767: set_zone 'JTN7' popcycle_group_for_peds_and_cars_to 5
328
0767: set_zone 'JTN8' popcycle_group_for_peds_and_cars_to 5
329
0767: set_zone 'JTE1' popcycle_group_for_peds_and_cars_to 5
330
0767: set_zone 'JTE2' popcycle_group_for_peds_and_cars_to 5
331
0767: set_zone 'JTE3' popcycle_group_for_peds_and_cars_to 5
332
0767: set_zone 'JTE4' popcycle_group_for_peds_and_cars_to 5
333
0767: set_zone 'HGP' popcycle_group_for_peds_and_cars_to 4
334
0767: set_zone 'SPIN' popcycle_group_for_peds_and_cars_to 11
335
0767: set_zone 'BINT1' popcycle_group_for_peds_and_cars_to 5
336
0767: set_zone 'BINT2' popcycle_group_for_peds_and_cars_to 5
337
0767: set_zone 'BINT3' popcycle_group_for_peds_and_cars_to 5
338
0767: set_zone 'BINT4' popcycle_group_for_peds_and_cars_to 5
339
0767: set_zone 'PRP1' popcycle_group_for_peds_and_cars_to 4
340
0767: set_zone 'PRP2' popcycle_group_for_peds_and_cars_to 4
341
0767: set_zone 'PRP3' popcycle_group_for_peds_and_cars_to 4
342
0767: set_zone 'PRP4' popcycle_group_for_peds_and_cars_to 4
343
0767: set_zone 'REDE1' popcycle_group_for_peds_and_cars_to 0
344
0767: set_zone 'REDE2' popcycle_group_for_peds_and_cars_to 0
345
0767: set_zone 'REDE3' popcycle_group_for_peds_and_cars_to 2
346
0767: set_zone 'REDW1' popcycle_group_for_peds_and_cars_to 5
347
0767: set_zone 'REDW2' popcycle_group_for_peds_and_cars_to 5
348
0767: set_zone 'REDW3' popcycle_group_for_peds_and_cars_to 11
349
0767: set_zone 'REDW4' popcycle_group_for_peds_and_cars_to 5
350
0767: set_zone 'ROCE1' popcycle_group_for_peds_and_cars_to 0
351
0767: set_zone 'ROCE2' popcycle_group_for_peds_and_cars_to 0
352
0767: set_zone 'OVS' popcycle_group_for_peds_and_cars_to 12
353
0767: set_zone 'CREE' popcycle_group_for_peds_and_cars_to 9
354
0767: set_zone 'STRIP1' popcycle_group_for_peds_and_cars_to 12
355
0767: set_zone 'STRIP2' popcycle_group_for_peds_and_cars_to 12
356
0767: set_zone 'STRIP3' popcycle_group_for_peds_and_cars_to 12
357
0767: set_zone 'STRIP4' popcycle_group_for_peds_and_cars_to 12
358
0767: set_zone 'PILL1' popcycle_group_for_peds_and_cars_to 9
359
0767: set_zone 'PILL2' popcycle_group_for_peds_and_cars_to 9
360
0767: set_zone 'RING' popcycle_group_for_peds_and_cars_to 12
361
0767: set_zone 'ISLE' popcycle_group_for_peds_and_cars_to 12
362
0767: set_zone 'STAR1' popcycle_group_for_peds_and_cars_to 12
363
0767: set_zone 'STAR2' popcycle_group_for_peds_and_cars_to 12
364
0767: set_zone 'ROY' popcycle_group_for_peds_and_cars_to 12
365
0767: set_zone 'CAM' popcycle_group_for_peds_and_cars_to 12
366
0767: set_zone 'LOT' popcycle_group_for_peds_and_cars_to 12
367
0767: set_zone 'PIRA' popcycle_group_for_peds_and_cars_to 12
368
0767: set_zone 'VISA1' popcycle_group_for_peds_and_cars_to 12
369
0767: set_zone 'VISA2' popcycle_group_for_peds_and_cars_to 12
370
0767: set_zone 'CALI1' popcycle_group_for_peds_and_cars_to 12
371
0767: set_zone 'CALI2' popcycle_group_for_peds_and_cars_to 12
372
0767: set_zone 'DRAG' popcycle_group_for_peds_and_cars_to 12
373
0767: set_zone 'PINK' popcycle_group_for_peds_and_cars_to 12
374
0767: set_zone 'HIGH' popcycle_group_for_peds_and_cars_to 12
375
0767: set_zone 'CONST1' popcycle_group_for_peds_and_cars_to 18
376
0767: set_zone 'ANGPI' popcycle_group_for_peds_and_cars_to 3
377
0767: set_zone 'SHACA' popcycle_group_for_peds_and_cars_to 3
378
0767: set_zone 'BACKO' popcycle_group_for_peds_and_cars_to 3
379
0767: set_zone 'BEACO' popcycle_group_for_peds_and_cars_to 3
380
0767: set_zone 'FARM' popcycle_group_for_peds_and_cars_to 3
381
0767: set_zone 'PALO' popcycle_group_for_peds_and_cars_to 3
382
0767: set_zone 'MONT' popcycle_group_for_peds_and_cars_to 3
383
0767: set_zone 'MONT1' popcycle_group_for_peds_and_cars_to 3
384
0767: set_zone 'MTCHI1' popcycle_group_for_peds_and_cars_to 3
385
0767: set_zone 'MTCHI2' popcycle_group_for_peds_and_cars_to 3
386
0767: set_zone 'MTCHI3' popcycle_group_for_peds_and_cars_to 3
387
0767: set_zone 'MTCHI4' popcycle_group_for_peds_and_cars_to 3
388
0767: set_zone 'HBARNS' popcycle_group_for_peds_and_cars_to 3
389
0767: set_zone 'DILLI' popcycle_group_for_peds_and_cars_to 3
390
0767: set_zone 'TOPFA' popcycle_group_for_peds_and_cars_to 3
391
0767: set_zone 'BLUEB' popcycle_group_for_peds_and_cars_to 3
392
0767: set_zone 'BLUEB1' popcycle_group_for_peds_and_cars_to 3
393
0767: set_zone 'PANOP' popcycle_group_for_peds_and_cars_to 3
394
0767: set_zone 'BLUAC' popcycle_group_for_peds_and_cars_to 3
395
0767: set_zone 'CREEK' popcycle_group_for_peds_and_cars_to 3
396
0767: set_zone 'CREEK1' popcycle_group_for_peds_and_cars_to 3
397
0767: set_zone 'MAKO' popcycle_group_for_peds_and_cars_to 3
398
0767: set_zone 'TOPFA' popcycle_group_for_peds_and_cars_to 3
399
0767: set_zone 'FERN' popcycle_group_for_peds_and_cars_to 3
400
0767: set_zone 'NROCK' popcycle_group_for_peds_and_cars_to 3
401
0767: set_zone 'HANKY' popcycle_group_for_peds_and_cars_to 3
402
0767: set_zone 'LEAFY' popcycle_group_for_peds_and_cars_to 3
403
0767: set_zone 'RED' popcycle_group_for_peds_and_cars_to 3
404
0767: set_zone 'FLINTC' popcycle_group_for_peds_and_cars_to 3
405
0767: set_zone 'WHET' popcycle_group_for_peds_and_cars_to 3
406
0767: set_zone 'BIGE' popcycle_group_for_peds_and_cars_to 1
407
0767: set_zone 'ELQUE' popcycle_group_for_peds_and_cars_to 1
408
0767: set_zone 'BARRA' popcycle_group_for_peds_and_cars_to 1
409
0767: set_zone 'CARSO' popcycle_group_for_peds_and_cars_to 1
410
0767: set_zone 'PAYAS' popcycle_group_for_peds_and_cars_to 1
411
0767: set_zone 'PROBE' popcycle_group_for_peds_and_cars_to 1
412
0767: set_zone 'ELCA' popcycle_group_for_peds_and_cars_to 1
413
0767: set_zone 'FLINTR' popcycle_group_for_peds_and_cars_to 1
414
0767: set_zone 'ARCO' popcycle_group_for_peds_and_cars_to 1
415
0767: set_zone 'VALLE' popcycle_group_for_peds_and_cars_to 1
416
0767: set_zone 'FLINTI' popcycle_group_for_peds_and_cars_to 1
417
0767: set_zone 'MONINT' popcycle_group_for_peds_and_cars_to 1
418
0767: set_zone 'ROBINT' popcycle_group_for_peds_and_cars_to 1
419
0767: set_zone 'TOM' popcycle_group_for_peds_and_cars_to 1
420
0767: set_zone 'ALDEA' popcycle_group_for_peds_and_cars_to 1
421
0767: set_zone 'BRUJA' popcycle_group_for_peds_and_cars_to 1
422
0767: set_zone 'ROBAD' popcycle_group_for_peds_and_cars_to 1
423
0767: set_zone 'BONE' popcycle_group_for_peds_and_cars_to 1
424
0767: set_zone 'HAUL' popcycle_group_for_peds_and_cars_to 18
425
0767: set_zone 'QUARY' popcycle_group_for_peds_and_cars_to 18
426
0767: set_zone 'OCTAN' popcycle_group_for_peds_and_cars_to 18
427
0767: set_zone 'PALMS' popcycle_group_for_peds_and_cars_to 18
428
0767: set_zone 'EBAY' popcycle_group_for_peds_and_cars_to 18
429
0767: set_zone 'EBAY2' popcycle_group_for_peds_and_cars_to 18
430
0767: set_zone 'DAM' popcycle_group_for_peds_and_cars_to 18
431
014B: $MY_CAR = init_parked_car_generator #BULLET color -1 -1 0 alarm 0 door_lock 0 1 10000 at 2474.2131 -1690.8783 12.1239 angle 180.0
432
014C: set_parked_car_generator $MY_CAR cars_to_generate_to 101
433
0213: $PICKUP_0001 = create_pickup #BODYARMOUR type 1 at 2491.0 -1685.8561 13.5107
434
032B: $PICKUP_0002 = create_weapon_pickup #MINIGUN group 15 ammo 60 at 2493.0 -1685.8561 13.5107
435
02E1: $PICKUP_0003 = create_cash_pickup 500 at 2495.0 -1685.8561 13.5107 permanence_flag 1
436
04A6: $PICKUP_0004 = create_asset_money_pickup_at 2497.0 -1685.8561 13.5107 money 10000 10000
437
fade 1 0
438
create_thread @SAVE
439
create_thread @MODEL
440
end_thread
441
442
:SAVE
443
thread 'SAVE'
444
wait 0
445
if AND
446
$ONMISSION == 0
447
0AB0: key_pressed 115
448
then
449
03D8: show_save_screen
450
wait 250
451
end
452
jump @SAVE
453
454
// начало нового кода
455
:MODEL
456
thread 'MODEL'
457
wait 0
458
if
459
056D: actor $PLAYER_ACTOR defined
460
jf @MODEL
461
$ICON = marker.CreateIconAndSphere(15, 2287.793, -1667.109, 15.0317)
462
463
:MODEL_1
464
wait 0
465
if
466
00EC: actor $PLAYER_ACTOR 0 near_point 2287.793 -1667.109 radius 15.0317 3.0
467
jf @MODEL_1
468
marker.Disable($ICON)
469
model.Load(#BALLAS1)
470
038B: load_requested_models
471
472
:MODEL_2
473
wait 0
474
if
475
model.Available(#BALLAS1)
476
jf @MODEL_2
477
$BALLAS = actor.Create(7, #BALLAS1, 2285.6228, -1680.5663, 13.1829)
478
actor.Angle($BALLAS) = 357.4442
479
actor.Health($BALLAS) = 300
480
model.Destroy(#BALLAS1)
481
077A: set_actor $BALLAS acquaintance 4 to_actors_pedtype 0 // see ped.dat
482
$MARKER = marker.CreateAboveActor($BALLAS)
483
07E0: set_marker $MARKER type_to 0
484
0168: set_marker $MARKER size 2
485
05E2: AS_actor $BALLAS kill_actor $PLAYER_ACTOR
486
487
:MODEL_4
488
wait 0
489
if OR
490
actor.Dead($PLAYER_ACTOR)
491
0741: actor $PLAYER_ACTOR busted
492
then
493
gosub @MODEL_3
494
jump @MODEL
495
end
496
if
497
actor.Dead($BALLAS)
498
then
499
gosub @MODEL_3
500
jump @MODEL_5
501
end
502
jump @MODEL_4
503
504
:MODEL_5
505
wait 0
506
Player.Money($PLAYER_CHAR) += 2000
507
0394: play_music 1
508
end_thread
509
510
:MODEL_3
511
wait 0
512
if
513
075C: marker $MARKER enabled
514
then
515
marker.Disable($MARKER)
516
end
517
if
518
actor.Defined($BALLAS)
519
then
520
actor.RemoveReferences($BALLAS)
521
actor.DestroyInstantly($BALLAS)
522
end
523
return
524
// конец нового кода
Copied!
Скрин:
Единственный минус, что такой скрипт при убийстве СЖ будет местами глючить по объективным причинам. Почему и как это исправить написано с следующем уроке. Таким образом вы создали мини-миссию, а это уже огромный плюс!|987|1|0|57390824png640400400`250``||delaem_prostoj_skript_prikhodim_k_tochke_i_ubivaem_nuzhnuju_cel|1506080800
Copy link
Edit on GitHub