Вопросы по CLEO-скриптингу

next23012

Новичок
59
6
Как сделать так: к примеру у меня скин 294 и скрипт автоматически при спавне вводит команду /portable?
Я так понял ты с ориона?
PHP:
if 02F2:   actor $PLAYER_ACTOR model == 294
then
say "/portable"
Думаю зацикливать не нужно, или будет включать\отключать portable каждый раз как будешь маску снимать
 
Последнее редактирование:

Zaxar_D

Известный
53
5
Я так понял ты с ориона?
PHP:
if 02F2:   actor $PLAYER_ACTOR model == 294
then
say "/portable"
Думаю зацикливать не нужно, или будет включать\отключать portable каждый раз как будешь маску снимать
Как то перечислять скины можно?
PHP:
if 02F2:   actor $PLAYER_ACTOR model == 294
02F2:  actor $PLAYER_ACTOR model == 295
02F2:  actor $PLAYER_ACTOR model == 296
then
say "/portable"
Такое возможно?
 

next23012

Новичок
59
6
Ставь дополнительное условие if or
CLEO:
if or
02F2:   actor $PLAYER_ACTOR model == 294
02F2:  actor $PLAYER_ACTOR model == 295
02F2:  actor $PLAYER_ACTOR model == 296
then
say "/portable"
 
Последнее редактирование:

Dark_Knight

Me, me and me.
Друг
4,056
2,074
Ставь 2 дополнительных условия: if and and
PHP:
if and and
02F2:   actor $PLAYER_ACTOR model == 294
02F2:  actor $PLAYER_ACTOR model == 295
02F2:  actor $PLAYER_ACTOR model == 296
then
say "/portable"
Используй не
Код:
[code=php]
[/code], a
Код:
[code=cleo]
[/code] и "если и" нужно поменять на "если или"
 

Zoxan_Twist

Новичок
126
29
Почему при входящему пакету с сервера о замене скина не выводиться сообщение в чат?

Код:
{$CLEO .cs}
0000: NOP

:1
0001: wait 0 ms
0AFA:  is_samp_available
004D: jump_if_false @1
0BE2: raknet setup_outcoming_packet_hook -26
0BDE: pause_thread 0
0BE5: raknet 0@ = get_hook_param 1
0039:   0@ == 153 //RPC_SCRSETPLAYERSKIN
004D: jump_if_false @2
0AF8: samp add_message_to_chat "Хук [%d]" color -1 0@

:2
0BE0: raknet hook_ret 1
 

woksonal

Известный
Проверенный
268
154
Почему при входящему пакету с сервера о замене скина не выводиться сообщение в чат?

Код:
{$CLEO .cs}
0000: NOP

:1
0001: wait 0 ms
0AFA:  is_samp_available
004D: jump_if_false @1
0BE2: raknet setup_outcoming_packet_hook -26
0BDE: pause_thread 0
0BE5: raknet 0@ = get_hook_param 1
0039:   0@ == 153 //RPC_SCRSETPLAYERSKIN
004D: jump_if_false @2
0AF8: samp add_message_to_chat "Хук [%d]" color -1 0@

:2
0BE0: raknet hook_ret 1

Ты ставишь хук на исходящий пакет, а надо на входящий rpc + с оффсет 99 процентов поставлен не тот.
 

.das

Известный
14
2
Как сделать, чтобы при использовании наркотиков\при скрытии интерфейса на F7 Cleo HP тоже скрывался?
 

Вложения

  • Health2.cs
    17.7 KB · Просмотры: 3

Rom4ik B1

Новичок
9
0
Пишет неизвестная команда thread tp
Cleo от CM Vovich
{$CLEO .cs}
thread "TP"
0000: NOP

repeat
wait 0
until Samp.Available()
0B34: samp register_client_command "tpm" to_label @tpmenu

repeat
wait 0
if 30@ == 1
then
0B80: dialog 3@ = create "TP by Axwell (Modified by [CM]Vovich)"
0AB1: call_scm_func @set_dialog_pos 3 3@ 300 350
0B82: dialog 3@ add_button id 0 text "Шахта" pos_XY 5 5 size 95 25
0B82: dialog 3@ add_button id 1 text "Завод" pos_XY 5 30 size 95 25
0B82: dialog 3@ add_button id 2 text "Грузчик" pos_XY 5 55 size 95 25
0B82: dialog 3@ add_button id 3 text "Разв.Прод." pos_XY 5 80 size 95 25
0B82: dialog 3@ add_button id 4 text "Мэрия LS" pos_XY 5 105 size 95 25
0B82: dialog 3@ add_button id 5 text "Мэрия SF" pos_XY 5 130 size 95 25
0B82: dialog 3@ add_button id 6 text "Мэрия LV" pos_XY 5 155 size 95 25
0B82: dialog 3@ add_button id 7 text "LSPD" pos_XY 5 180 size 95 25
0B82: dialog 3@ add_button id 8 text "SFPD" pos_XY 5 205 size 95 25
0B82: dialog 3@ add_button id 9 text "LVPD" pos_XY 5 230 size 95 25
0B82: dialog 3@ add_button id 10 text "Болька LS" pos_XY 5 255 size 95 25
0B82: dialog 3@ add_button id 11 text "Болька SF" pos_XY 5 280 size 95 25
0B82: dialog 3@ add_button id 12 text "Болька LV" pos_XY 5 305 size 95 25
0B82: dialog 3@ add_button id 13 text "Ballas" pos_XY 100 5 size 95 25
0B82: dialog 3@ add_button id 14 text "Grove" pos_XY 100 30 size 95 25
0B82: dialog 3@ add_button id 15 text "Aztecas" pos_XY 100 55 size 95 25
0B82: dialog 3@ add_button id 16 text "Vagos" pos_XY 100 80 size 95 25
0B82: dialog 3@ add_button id 17 text "Rifa" pos_XY 100 105 size 95 25
0B82: dialog 3@ add_button id 18 text "ЛКН" pos_XY 100 130 size 95 25
0B82: dialog 3@ add_button id 19 text "Якудза" pos_XY 100 155 size 95 25
0B82: dialog 3@ add_button id 20 text "РМ" pos_XY 100 180 size 95 25
0B82: dialog 3@ add_button id 21 text "ФБР" pos_XY 100 205 size 95 25
0B82: dialog 3@ add_button id 22 text "АП" pos_XY 100 230 size 95 25
0B82: dialog 3@ add_button id 23 text "LSFM" pos_XY 100 255 size 95 25
0B82: dialog 3@ add_button id 24 text "SFFM" pos_XY 100 280 size 95 25
0B82: dialog 3@ add_button id 25 text "LVFM" pos_XY 100 305 size 95 25
0B82: dialog 3@ add_button id 26 text "TV" pos_XY 195 5 size 95 25
0B82: dialog 3@ add_button id 27 text "СВ" pos_XY 195 30 size 95 25
0B82: dialog 3@ add_button id 28 text "ВМФ" pos_XY 195 55 size 95 25
0B82: dialog 3@ add_button id 29 text "ВВС" pos_XY 195 80 size 95 25
0B82: dialog 3@ add_button id 30 text "МО" pos_XY 195 105 size 95 25
0B82: dialog 3@ add_button id 31 text "Автошкола" pos_XY 195 130 size 95 25
0B82: dialog 3@ add_button id 32 text "Метка" pos_XY 195 155 size 95 25
0B82: dialog 3@ add_button id 33 text "Закрыть" pos_XY 195 180 size 95 25
0B8D: samp set_cursor_mode 2
while 0B87: dialog 3@ is_visible
wait 0

{=====Перенос=====}
if 0AB0: key_pressed 1
then
0B5E: get_cursor_pos 28@ 27@
0B85: samp dialog 3@ get_position_to 26@ 25@ size_to 0@ 0@
if and
001D: 28@ > 26@
001D: 27@ > 25@
then
26@ += 340
25@ += 20
if and
001D: 26@ > 28@
001D: 25@ > 27@
then
26@ -= 340
25@ -= 20
0062: 28@ -= 26@
0062: 27@ -= 25@
while 0AB0: key_pressed 1
wait 0
0B5E: get_cursor_pos 26@ 25@
0062: 26@ -= 28@
0062: 25@ -= 27@
0B84: samp dialog 3@ set_pos_XY 26@ 25@ size 300 350
end
end
end
end
{=================}
if 0B81: dialog 3@ pop_event_to 4@ {id события} control_id_to 2@ {id компонента}
then
if 2@ == 32
then
if 0AB6: store_target_marker_coords_to 4@ 5@ 6@ // IF and SET
then
0AB1: call_scm_func @TP 3 4@ 5@ 6@ // Телепортируем
wait 0
0AB6: store_target_marker_coords_to 4@ 5@ 6@ // IF and SET
Actor.PutAt($PLAYER_ACTOR, 4@, 5@, 6@)
0B86: dialog 3@ set_visible false
0B8D: samp set_cursor_mode 0
30@ = 0
else
0AF8: samp add_message_to_chat "Ошибка! Необходимо поставить метку на карте" color 0xff0000
end
else
if 2@ == 33
then
0B86: dialog 3@ set_visible false
0B8D: samp set_cursor_mode 0
30@ = 0
else
0AB1: call_scm_func @coords 1 2@ 4@ 5@ 6@ // Получаем координаты
0AB1: call_scm_func @TP 3 4@ 5@ 6@ // Телепортируем
0B86: dialog 3@ set_visible false
0B8D: samp set_cursor_mode 0
30@ = 0
end
end
end
end
end
until false

:tpmenu
if 30@ == 0
then
30@ = 1
end
0B43: samp cmd_ret

:set_dialog_pos // [0@ = dialog id] [1@ = size x] [2@ = size y]
0B5A: get_screen_resolution 3@ 4@
0063: 4@ -= 2@
0B84: dialog 0@ set_pos_XY 1 4@ size 1@ 2@
0AB2: ret 0

:TP {x} {y} {z}
wait 0
0B28: samp disconnect_with_reason 0
wait 15000
0B27: samp set_gamestate 1
repeat
wait 0
until 0B61: samp is_local_player_spawned
wait 2000
Actor.PutAt($PLAYER_ACTOR, 0@, 1@, 2@)
0AB2: ret 0

:coords {but }
if 0@ == 0 // waxta
then
1@ = -1893.5366
2@ = -1602.8402
3@ = 21.7500
end

if 0@ == 1 // Завод
then
1@ = -129.7006
2@ = -339.2880
3@ = 1.4297
end

if 0@ == 2 // Грузчик
then
1@ = 2158.5872
2@ = -2316.2393
3@ = 15.8181
end

if 0@ == 3 // Разв. прод.
then
1@ = 2286.1265
2@ = -2312.2734
3@ = 13.5413
end

if 0@ == 4 // Мэрия ЛС
then
1@ = 1505.3599
2@ = -1753.9567
3@ = 13.5469
end

if 0@ == 5 // Мэрия СФ
then
1@ = -2768.9116
2@ = 361.9172
3@ = 4.4738
end

if 0@ == 6 // Мэрия ЛВ
then
1@ = 2389.1733
2@ = 2423.1089
3@ = 10.8125
end

if 0@ == 7 // lSPD
then
1@ = 1553.6309
2@ = -1671.4644
3@ = 13.5562
end

if 0@ == 8 // SFPD
then
1@ = -1601.9305
2@ = 717.2076
3@ = 11.3774
end

if 0@ == 9 // LVPD
then
1@ = 2281.3735
2@ = 2428.8369
3@ = 10.8203
end

if 0@ == 10 // Hosp LS
then
1@ = 1180.3518
2@ = -1305.7943
3@ = 13.7950
end

if 0@ == 11 // Hosp SF
then
1@ = -2680.4097
2@ = 637.1298
3@ = 14.4531
end

if 0@ == 12 // Hosp LV
then
1@ = 1592.6801
2@ = 1816.8179
3@ = 10.8203
end

if 0@ == 13 // ballas
then
1@ = 2017.0066
2@ = -1109.5461
3@ = 26.2031
end

if 0@ == 14 // grove
then
1@ = 2465.0613
2@ = -1710.5726
3@ = 13.5022
end

if 0@ == 15 // aztec
then
1@ = 2170.1987
2@ = -1728.4161
3@ = 13.5409
end

if 0@ == 16 // vaginos
then
1@ = 2766.8125
2@ = -1178.2269
3@ = 69.4036
end

if 0@ == 17 // Rifa
then
1@ = 2786.8208
2@ = -1898.5823
3@ = 11.0657
end

if 0@ == 18 // LCN
then
1@ = 1432.5754
2@ = 2733.1392
3@ = 10.8203
end

if 0@ == 19 // Yakuza
then
1@ = 2549.2310
2@ = 1842.1932
3@ = 10.8203
end

if 0@ == 20 // Rus. Maf
then
1@ = 985.8802
2@ = 1690.6359
3@ = 9.1081
end

if 0@ == 21 // FBI
then
1@ = -2374.7913
2@ = 484.8788
3@ = 29.7990
end

if 0@ == 22 // AP
then
1@ = 951.6120
2@ = -893.6904
3@ = 45.7656
end

if 0@ == 23 // LSFM
then
1@ = 1630.1149
2@ = -1650.5219
3@ = 22.5156
end

if 0@ == 24 // SFFM
then
1@ = -1838.0138
2@ = 587.2550
3@ = 35.1641
end

if 0@ == 25 // LVFM
then
1@ = 2101.2039
2@ = 2359.7285
3@ = 11.2422
end

if 0@ == 26 // TV
then
1@ = 1785.4913
2@ = -1307.5454
3@ = 13.6968
end

if 0@ == 27 // CВ
then
1@ = 397.0686
2@ = 1918.8665
3@ = 17.6406
end

if 0@ == 28 // ВМФ
then
1@ = -2334.5613
2@ = 2367.3196
3@= 5.6221
end

if 0@ == 29 // ВВС
then
1@ = 495.6856
2@ = 2603.2561
3@ = 61.5528
end

if 0@ == 30 // Военком
then
1@ = 1139.3917
2@ = 1382.6759
3@ = 10.8203
end

if 0@ == 31 // Автошкола
then
1@ = -2040.5258
2@ = -104.4789
3@ = 35.1719
end

0AB2: ret 3 1@ 2@ 3@

Я кароч немножко уменьшил телепортов
{$CLEO .cs}
thread "TP"
0000: NOP

repeat
wait 0
until Samp.Available()
0B34: samp register_client_command "tpm" to_label @tpmenu

repeat
wait 0
if 30@ == 1
then
0B80: dialog 3@ = create "TP)"
0AB1: call_scm_func @set_dialog_pos 3 3@ 300 350
0B82: dialog 3@ add_button id 0 text "Шахта" pos_XY 5 5 size 95 25
0B82: dialog 3@ add_button id 4 text "Мэрия LS" pos_XY 5 105 size 95 25
0B82: dialog 3@ add_button id 5 text "Мэрия SF" pos_XY 5 130 size 95 25
0B82: dialog 3@ add_button id 6 text "Мэрия LV" pos_XY 5 155 size 95 25
0B82: dialog 3@ add_button id 7 text "LSPD" pos_XY 5 180 size 95 25
0B82: dialog 3@ add_button id 8 text "SFPD" pos_XY 5 205 size 95 25
0B82: dialog 3@ add_button id 9 text "LVPD" pos_XY 5 230 size 95 25
0B82: dialog 3@ add_button id 10 text "Болька LS" pos_XY 5 255 size 95 25
0B82: dialog 3@ add_button id 11 text "Болька SF" pos_XY 5 280 size 95 25
0B82: dialog 3@ add_button id 12 text "Болька LV" pos_XY 5 305 size 95 25
0B82: dialog 3@ add_button id 13 text "Ballas" pos_XY 100 5 size 95 25
0B82: dialog 3@ add_button id 14 text "Grove" pos_XY 100 30 size 95 25
0B82: dialog 3@ add_button id 15 text "Aztecas" pos_XY 100 55 size 95 25
0B82: dialog 3@ add_button id 16 text "Vagos" pos_XY 100 80 size 95 25
0B82: dialog 3@ add_button id 17 text "Rifa" pos_XY 100 105 size 95 25
0B82: dialog 3@ add_button id 18 text "ЛКН" pos_XY 100 130 size 95 25
0B82: dialog 3@ add_button id 19 text "Якудза" pos_XY 100 155 size 95 25
0B82: dialog 3@ add_button id 20 text "РМ" pos_XY 100 180 size 95 25
0B82: dialog 3@ add_button id 27 text "СВ" pos_XY 195 30 size 95 25
0B82: dialog 3@ add_button id 28 text "ВМФ" pos_XY 195 55 size 95 25
0B82: dialog 3@ add_button id 29 text "ВВС" pos_XY 195 80 size 95 25
0B82: dialog 3@ add_button id 30 text "МО" pos_XY 195 105 size 95 25
0B82: dialog 3@ add_button id 31 text "Автошкола" pos_XY 195 130 size 95 25
0B82: dialog 3@ add_button id 32 text "Метка" pos_XY 195 155 size 95 25
0B82: dialog 3@ add_button id 33 text "Закрыть" pos_XY 195 180 size 95 25
0B8D: samp set_cursor_mode 2
while 0B87: dialog 3@ is_visible
wait 0

{=====Перенос=====}
if 0AB0: key_pressed 1
then
0B5E: get_cursor_pos 28@ 27@
0B85: samp dialog 3@ get_position_to 26@ 25@ size_to 0@ 0@
if and
001D: 28@ > 26@
001D: 27@ > 25@
then
26@ += 340
25@ += 20
if and
001D: 26@ > 28@
001D: 25@ > 27@
then
26@ -= 340
25@ -= 20
0062: 28@ -= 26@
0062: 27@ -= 25@
while 0AB0: key_pressed 1
wait 0
0B5E: get_cursor_pos 26@ 25@
0062: 26@ -= 28@
0062: 25@ -= 27@
0B84: samp dialog 3@ set_pos_XY 26@ 25@ size 300 350
end
end
end
end
{=================}
if 0B81: dialog 3@ pop_event_to 4@ {id события} control_id_to 2@ {id компонента}
then
if 2@ == 32
then
if 0AB6: store_target_marker_coords_to 4@ 5@ 6@ // IF and SET
then
0AB1: call_scm_func @TP 3 4@ 5@ 6@ // Телепортируем
wait 0
0AB6: store_target_marker_coords_to 4@ 5@ 6@ // IF and SET
Actor.PutAt($PLAYER_ACTOR, 4@, 5@, 6@)
0B86: dialog 3@ set_visible false
0B8D: samp set_cursor_mode 0
30@ = 0
else
0AF8: samp add_message_to_chat "Ошибка! Необходимо поставить метку на карте" color 0xff0000
end
else
if 2@ == 33
then
0B86: dialog 3@ set_visible false
0B8D: samp set_cursor_mode 0
30@ = 0
else
0AB1: call_scm_func @coords 1 2@ 4@ 5@ 6@ // Получаем координаты
0AB1: call_scm_func @TP 3 4@ 5@ 6@ // Телепортируем
0B86: dialog 3@ set_visible false
0B8D: samp set_cursor_mode 0
30@ = 0
end
end
end
end
end
until false

:tpmenu
if 30@ == 0
then
30@ = 1
end
0B43: samp cmd_ret

:set_dialog_pos // [0@ = dialog id] [1@ = size x] [2@ = size y]
0B5A: get_screen_resolution 3@ 4@
0063: 4@ -= 2@
0B84: dialog 0@ set_pos_XY 1 4@ size 1@ 2@
0AB2: ret 0

:TP {x} {y} {z}
wait 0
0B28: samp disconnect_with_reason 0
wait 15000
0B27: samp set_gamestate 1
repeat
wait 0
until 0B61: samp is_local_player_spawned
wait 2000
Actor.PutAt($PLAYER_ACTOR, 0@, 1@, 2@)
0AB2: ret 0

:coords {but }
if 0@ == 1 // waxta
then
1@ = -1893.5366
2@ = -1602.8402
3@ = 21.7500
end

if 0@ == 2 // Мэрия ЛС
then
1@ = 1505.3599
2@ = -1753.9567
3@ = 13.5469
end

if 0@ == 3 // Мэрия СФ
then
1@ = -2768.9116
2@ = 361.9172
3@ = 4.4738
end

if 0@ == 4 // Мэрия ЛВ
then
1@ = 2389.1733
2@ = 2423.1089
3@ = 10.8125
end

if 0@ == 4 // lSPD
then
1@ = 1553.6309
2@ = -1671.4644
3@ = 13.5562
end

if 0@ == 5 // SFPD
then
1@ = -1601.9305
2@ = 717.2076
3@ = 11.3774
end

if 0@ == 6 // LVPD
then
1@ = 2281.3735
2@ = 2428.8369
3@ = 10.8203
end

if 0@ == 7 // Hosp LS
then
1@ = 1180.3518
2@ = -1305.7943
3@ = 13.7950
end

if 0@ == 8 // Hosp SF
then
1@ = -2680.4097
2@ = 637.1298
3@ = 14.4531
end

if 0@ == 9 // Hosp LV
then
1@ = 1592.6801
2@ = 1816.8179
3@ = 10.8203
end

if 0@ == 10 // ballas
then
1@ = 2017.0066
2@ = -1109.5461
3@ = 26.2031
end

if 0@ == 11 // grove
then
1@ = 2465.0613
2@ = -1710.5726
3@ = 13.5022
end

if 0@ == 12 // aztec
then
1@ = 2170.1987
2@ = -1728.4161
3@ = 13.5409
end

if 0@ == 13 // vaginos
then
1@ = 2766.8125
2@ = -1178.2269
3@ = 69.4036
end

if 0@ == 14 // Rifa
then
1@ = 2786.8208
2@ = -1898.5823
3@ = 11.0657
end

if 0@ == 15 // LCN
then
1@ = 1432.5754
2@ = 2733.1392
3@ = 10.8203
end

if 0@ == 16 // Yakuza
then
1@ = 2549.2310
2@ = 1842.1932
3@ = 10.8203
end

if 0@ == 17 // Rus. Maf
then
1@ = 985.8802
2@ = 1690.6359
3@ = 9.1081
end

if 0@ == 18 // CВ
then
1@ = 397.0686
2@ = 1918.8665
3@ = 17.6406
end

if 0@ == 19 // ВМФ
then
1@ = -2334.5613
2@ = 2367.3196
3@= 5.6221
end

if 0@ == 20 // ВВС
then
1@ = 495.6856
2@ = 2603.2561
3@ = 61.5528
end

if 0@ == 21 // Военком
then
1@ = 1139.3917
2@ = 1382.6759
3@ = 10.8203
end

if 0@ == 22 // Автошкола
then
1@ = -2040.5258
2@ = -104.4789
3@ = 35.1719
end

0AB2: ret 3 1@ 2@ 3@


Выходит ошибка кароч: Неизвестная команда thread "TP"
 

hnnssy

Известный
Друг
2,684
2,744
Пишет неизвестная команда thread tp
Cleo от CM Vovich
{$CLEO .cs}
thread "TP"
0000: NOP

repeat
wait 0
until Samp.Available()
0B34: samp register_client_command "tpm" to_label @tpmenu

repeat
wait 0
if 30@ == 1
then
0B80: dialog 3@ = create "TP by Axwell (Modified by [CM]Vovich)"
0AB1: call_scm_func @set_dialog_pos 3 3@ 300 350
0B82: dialog 3@ add_button id 0 text "Шахта" pos_XY 5 5 size 95 25
0B82: dialog 3@ add_button id 1 text "Завод" pos_XY 5 30 size 95 25
0B82: dialog 3@ add_button id 2 text "Грузчик" pos_XY 5 55 size 95 25
0B82: dialog 3@ add_button id 3 text "Разв.Прод." pos_XY 5 80 size 95 25
0B82: dialog 3@ add_button id 4 text "Мэрия LS" pos_XY 5 105 size 95 25
0B82: dialog 3@ add_button id 5 text "Мэрия SF" pos_XY 5 130 size 95 25
0B82: dialog 3@ add_button id 6 text "Мэрия LV" pos_XY 5 155 size 95 25
0B82: dialog 3@ add_button id 7 text "LSPD" pos_XY 5 180 size 95 25
0B82: dialog 3@ add_button id 8 text "SFPD" pos_XY 5 205 size 95 25
0B82: dialog 3@ add_button id 9 text "LVPD" pos_XY 5 230 size 95 25
0B82: dialog 3@ add_button id 10 text "Болька LS" pos_XY 5 255 size 95 25
0B82: dialog 3@ add_button id 11 text "Болька SF" pos_XY 5 280 size 95 25
0B82: dialog 3@ add_button id 12 text "Болька LV" pos_XY 5 305 size 95 25
0B82: dialog 3@ add_button id 13 text "Ballas" pos_XY 100 5 size 95 25
0B82: dialog 3@ add_button id 14 text "Grove" pos_XY 100 30 size 95 25
0B82: dialog 3@ add_button id 15 text "Aztecas" pos_XY 100 55 size 95 25
0B82: dialog 3@ add_button id 16 text "Vagos" pos_XY 100 80 size 95 25
0B82: dialog 3@ add_button id 17 text "Rifa" pos_XY 100 105 size 95 25
0B82: dialog 3@ add_button id 18 text "ЛКН" pos_XY 100 130 size 95 25
0B82: dialog 3@ add_button id 19 text "Якудза" pos_XY 100 155 size 95 25
0B82: dialog 3@ add_button id 20 text "РМ" pos_XY 100 180 size 95 25
0B82: dialog 3@ add_button id 21 text "ФБР" pos_XY 100 205 size 95 25
0B82: dialog 3@ add_button id 22 text "АП" pos_XY 100 230 size 95 25
0B82: dialog 3@ add_button id 23 text "LSFM" pos_XY 100 255 size 95 25
0B82: dialog 3@ add_button id 24 text "SFFM" pos_XY 100 280 size 95 25
0B82: dialog 3@ add_button id 25 text "LVFM" pos_XY 100 305 size 95 25
0B82: dialog 3@ add_button id 26 text "TV" pos_XY 195 5 size 95 25
0B82: dialog 3@ add_button id 27 text "СВ" pos_XY 195 30 size 95 25
0B82: dialog 3@ add_button id 28 text "ВМФ" pos_XY 195 55 size 95 25
0B82: dialog 3@ add_button id 29 text "ВВС" pos_XY 195 80 size 95 25
0B82: dialog 3@ add_button id 30 text "МО" pos_XY 195 105 size 95 25
0B82: dialog 3@ add_button id 31 text "Автошкола" pos_XY 195 130 size 95 25
0B82: dialog 3@ add_button id 32 text "Метка" pos_XY 195 155 size 95 25
0B82: dialog 3@ add_button id 33 text "Закрыть" pos_XY 195 180 size 95 25
0B8D: samp set_cursor_mode 2
while 0B87: dialog 3@ is_visible
wait 0

{=====Перенос=====}
if 0AB0: key_pressed 1
then
0B5E: get_cursor_pos 28@ 27@
0B85: samp dialog 3@ get_position_to 26@ 25@ size_to 0@ 0@
if and
001D: 28@ > 26@
001D: 27@ > 25@
then
26@ += 340
25@ += 20
if and
001D: 26@ > 28@
001D: 25@ > 27@
then
26@ -= 340
25@ -= 20
0062: 28@ -= 26@
0062: 27@ -= 25@
while 0AB0: key_pressed 1
wait 0
0B5E: get_cursor_pos 26@ 25@
0062: 26@ -= 28@
0062: 25@ -= 27@
0B84: samp dialog 3@ set_pos_XY 26@ 25@ size 300 350
end
end
end
end
{=================}
if 0B81: dialog 3@ pop_event_to 4@ {id события} control_id_to 2@ {id компонента}
then
if 2@ == 32
then
if 0AB6: store_target_marker_coords_to 4@ 5@ 6@ // IF and SET
then
0AB1: call_scm_func @TP 3 4@ 5@ 6@ // Телепортируем
wait 0
0AB6: store_target_marker_coords_to 4@ 5@ 6@ // IF and SET
Actor.PutAt($PLAYER_ACTOR, 4@, 5@, 6@)
0B86: dialog 3@ set_visible false
0B8D: samp set_cursor_mode 0
30@ = 0
else
0AF8: samp add_message_to_chat "Ошибка! Необходимо поставить метку на карте" color 0xff0000
end
else
if 2@ == 33
then
0B86: dialog 3@ set_visible false
0B8D: samp set_cursor_mode 0
30@ = 0
else
0AB1: call_scm_func @coords 1 2@ 4@ 5@ 6@ // Получаем координаты
0AB1: call_scm_func @TP 3 4@ 5@ 6@ // Телепортируем
0B86: dialog 3@ set_visible false
0B8D: samp set_cursor_mode 0
30@ = 0
end
end
end
end
end
until false

:tpmenu
if 30@ == 0
then
30@ = 1
end
0B43: samp cmd_ret

:set_dialog_pos // [0@ = dialog id] [1@ = size x] [2@ = size y]
0B5A: get_screen_resolution 3@ 4@
0063: 4@ -= 2@
0B84: dialog 0@ set_pos_XY 1 4@ size 1@ 2@
0AB2: ret 0

:TP {x} {y} {z}
wait 0
0B28: samp disconnect_with_reason 0
wait 15000
0B27: samp set_gamestate 1
repeat
wait 0
until 0B61: samp is_local_player_spawned
wait 2000
Actor.PutAt($PLAYER_ACTOR, 0@, 1@, 2@)
0AB2: ret 0

:coords {but }
if 0@ == 0 // waxta
then
1@ = -1893.5366
2@ = -1602.8402
3@ = 21.7500
end

if 0@ == 1 // Завод
then
1@ = -129.7006
2@ = -339.2880
3@ = 1.4297
end

if 0@ == 2 // Грузчик
then
1@ = 2158.5872
2@ = -2316.2393
3@ = 15.8181
end

if 0@ == 3 // Разв. прод.
then
1@ = 2286.1265
2@ = -2312.2734
3@ = 13.5413
end

if 0@ == 4 // Мэрия ЛС
then
1@ = 1505.3599
2@ = -1753.9567
3@ = 13.5469
end

if 0@ == 5 // Мэрия СФ
then
1@ = -2768.9116
2@ = 361.9172
3@ = 4.4738
end

if 0@ == 6 // Мэрия ЛВ
then
1@ = 2389.1733
2@ = 2423.1089
3@ = 10.8125
end

if 0@ == 7 // lSPD
then
1@ = 1553.6309
2@ = -1671.4644
3@ = 13.5562
end

if 0@ == 8 // SFPD
then
1@ = -1601.9305
2@ = 717.2076
3@ = 11.3774
end

if 0@ == 9 // LVPD
then
1@ = 2281.3735
2@ = 2428.8369
3@ = 10.8203
end

if 0@ == 10 // Hosp LS
then
1@ = 1180.3518
2@ = -1305.7943
3@ = 13.7950
end

if 0@ == 11 // Hosp SF
then
1@ = -2680.4097
2@ = 637.1298
3@ = 14.4531
end

if 0@ == 12 // Hosp LV
then
1@ = 1592.6801
2@ = 1816.8179
3@ = 10.8203
end

if 0@ == 13 // ballas
then
1@ = 2017.0066
2@ = -1109.5461
3@ = 26.2031
end

if 0@ == 14 // grove
then
1@ = 2465.0613
2@ = -1710.5726
3@ = 13.5022
end

if 0@ == 15 // aztec
then
1@ = 2170.1987
2@ = -1728.4161
3@ = 13.5409
end

if 0@ == 16 // vaginos
then
1@ = 2766.8125
2@ = -1178.2269
3@ = 69.4036
end

if 0@ == 17 // Rifa
then
1@ = 2786.8208
2@ = -1898.5823
3@ = 11.0657
end

if 0@ == 18 // LCN
then
1@ = 1432.5754
2@ = 2733.1392
3@ = 10.8203
end

if 0@ == 19 // Yakuza
then
1@ = 2549.2310
2@ = 1842.1932
3@ = 10.8203
end

if 0@ == 20 // Rus. Maf
then
1@ = 985.8802
2@ = 1690.6359
3@ = 9.1081
end

if 0@ == 21 // FBI
then
1@ = -2374.7913
2@ = 484.8788
3@ = 29.7990
end

if 0@ == 22 // AP
then
1@ = 951.6120
2@ = -893.6904
3@ = 45.7656
end

if 0@ == 23 // LSFM
then
1@ = 1630.1149
2@ = -1650.5219
3@ = 22.5156
end

if 0@ == 24 // SFFM
then
1@ = -1838.0138
2@ = 587.2550
3@ = 35.1641
end

if 0@ == 25 // LVFM
then
1@ = 2101.2039
2@ = 2359.7285
3@ = 11.2422
end

if 0@ == 26 // TV
then
1@ = 1785.4913
2@ = -1307.5454
3@ = 13.6968
end

if 0@ == 27 // CВ
then
1@ = 397.0686
2@ = 1918.8665
3@ = 17.6406
end

if 0@ == 28 // ВМФ
then
1@ = -2334.5613
2@ = 2367.3196
3@= 5.6221
end

if 0@ == 29 // ВВС
then
1@ = 495.6856
2@ = 2603.2561
3@ = 61.5528
end

if 0@ == 30 // Военком
then
1@ = 1139.3917
2@ = 1382.6759
3@ = 10.8203
end

if 0@ == 31 // Автошкола
then
1@ = -2040.5258
2@ = -104.4789
3@ = 35.1719
end

0AB2: ret 3 1@ 2@ 3@

Я кароч немножко уменьшил телепортов
{$CLEO .cs}
thread "TP"
0000: NOP

repeat
wait 0
until Samp.Available()
0B34: samp register_client_command "tpm" to_label @tpmenu

repeat
wait 0
if 30@ == 1
then
0B80: dialog 3@ = create "TP)"
0AB1: call_scm_func @set_dialog_pos 3 3@ 300 350
0B82: dialog 3@ add_button id 0 text "Шахта" pos_XY 5 5 size 95 25
0B82: dialog 3@ add_button id 4 text "Мэрия LS" pos_XY 5 105 size 95 25
0B82: dialog 3@ add_button id 5 text "Мэрия SF" pos_XY 5 130 size 95 25
0B82: dialog 3@ add_button id 6 text "Мэрия LV" pos_XY 5 155 size 95 25
0B82: dialog 3@ add_button id 7 text "LSPD" pos_XY 5 180 size 95 25
0B82: dialog 3@ add_button id 8 text "SFPD" pos_XY 5 205 size 95 25
0B82: dialog 3@ add_button id 9 text "LVPD" pos_XY 5 230 size 95 25
0B82: dialog 3@ add_button id 10 text "Болька LS" pos_XY 5 255 size 95 25
0B82: dialog 3@ add_button id 11 text "Болька SF" pos_XY 5 280 size 95 25
0B82: dialog 3@ add_button id 12 text "Болька LV" pos_XY 5 305 size 95 25
0B82: dialog 3@ add_button id 13 text "Ballas" pos_XY 100 5 size 95 25
0B82: dialog 3@ add_button id 14 text "Grove" pos_XY 100 30 size 95 25
0B82: dialog 3@ add_button id 15 text "Aztecas" pos_XY 100 55 size 95 25
0B82: dialog 3@ add_button id 16 text "Vagos" pos_XY 100 80 size 95 25
0B82: dialog 3@ add_button id 17 text "Rifa" pos_XY 100 105 size 95 25
0B82: dialog 3@ add_button id 18 text "ЛКН" pos_XY 100 130 size 95 25
0B82: dialog 3@ add_button id 19 text "Якудза" pos_XY 100 155 size 95 25
0B82: dialog 3@ add_button id 20 text "РМ" pos_XY 100 180 size 95 25
0B82: dialog 3@ add_button id 27 text "СВ" pos_XY 195 30 size 95 25
0B82: dialog 3@ add_button id 28 text "ВМФ" pos_XY 195 55 size 95 25
0B82: dialog 3@ add_button id 29 text "ВВС" pos_XY 195 80 size 95 25
0B82: dialog 3@ add_button id 30 text "МО" pos_XY 195 105 size 95 25
0B82: dialog 3@ add_button id 31 text "Автошкола" pos_XY 195 130 size 95 25
0B82: dialog 3@ add_button id 32 text "Метка" pos_XY 195 155 size 95 25
0B82: dialog 3@ add_button id 33 text "Закрыть" pos_XY 195 180 size 95 25
0B8D: samp set_cursor_mode 2
while 0B87: dialog 3@ is_visible
wait 0

{=====Перенос=====}
if 0AB0: key_pressed 1
then
0B5E: get_cursor_pos 28@ 27@
0B85: samp dialog 3@ get_position_to 26@ 25@ size_to 0@ 0@
if and
001D: 28@ > 26@
001D: 27@ > 25@
then
26@ += 340
25@ += 20
if and
001D: 26@ > 28@
001D: 25@ > 27@
then
26@ -= 340
25@ -= 20
0062: 28@ -= 26@
0062: 27@ -= 25@
while 0AB0: key_pressed 1
wait 0
0B5E: get_cursor_pos 26@ 25@
0062: 26@ -= 28@
0062: 25@ -= 27@
0B84: samp dialog 3@ set_pos_XY 26@ 25@ size 300 350
end
end
end
end
{=================}
if 0B81: dialog 3@ pop_event_to 4@ {id события} control_id_to 2@ {id компонента}
then
if 2@ == 32
then
if 0AB6: store_target_marker_coords_to 4@ 5@ 6@ // IF and SET
then
0AB1: call_scm_func @TP 3 4@ 5@ 6@ // Телепортируем
wait 0
0AB6: store_target_marker_coords_to 4@ 5@ 6@ // IF and SET
Actor.PutAt($PLAYER_ACTOR, 4@, 5@, 6@)
0B86: dialog 3@ set_visible false
0B8D: samp set_cursor_mode 0
30@ = 0
else
0AF8: samp add_message_to_chat "Ошибка! Необходимо поставить метку на карте" color 0xff0000
end
else
if 2@ == 33
then
0B86: dialog 3@ set_visible false
0B8D: samp set_cursor_mode 0
30@ = 0
else
0AB1: call_scm_func @coords 1 2@ 4@ 5@ 6@ // Получаем координаты
0AB1: call_scm_func @TP 3 4@ 5@ 6@ // Телепортируем
0B86: dialog 3@ set_visible false
0B8D: samp set_cursor_mode 0
30@ = 0
end
end
end
end
end
until false

:tpmenu
if 30@ == 0
then
30@ = 1
end
0B43: samp cmd_ret

:set_dialog_pos // [0@ = dialog id] [1@ = size x] [2@ = size y]
0B5A: get_screen_resolution 3@ 4@
0063: 4@ -= 2@
0B84: dialog 0@ set_pos_XY 1 4@ size 1@ 2@
0AB2: ret 0

:TP {x} {y} {z}
wait 0
0B28: samp disconnect_with_reason 0
wait 15000
0B27: samp set_gamestate 1
repeat
wait 0
until 0B61: samp is_local_player_spawned
wait 2000
Actor.PutAt($PLAYER_ACTOR, 0@, 1@, 2@)
0AB2: ret 0

:coords {but }
if 0@ == 1 // waxta
then
1@ = -1893.5366
2@ = -1602.8402
3@ = 21.7500
end

if 0@ == 2 // Мэрия ЛС
then
1@ = 1505.3599
2@ = -1753.9567
3@ = 13.5469
end

if 0@ == 3 // Мэрия СФ
then
1@ = -2768.9116
2@ = 361.9172
3@ = 4.4738
end

if 0@ == 4 // Мэрия ЛВ
then
1@ = 2389.1733
2@ = 2423.1089
3@ = 10.8125
end

if 0@ == 4 // lSPD
then
1@ = 1553.6309
2@ = -1671.4644
3@ = 13.5562
end

if 0@ == 5 // SFPD
then
1@ = -1601.9305
2@ = 717.2076
3@ = 11.3774
end

if 0@ == 6 // LVPD
then
1@ = 2281.3735
2@ = 2428.8369
3@ = 10.8203
end

if 0@ == 7 // Hosp LS
then
1@ = 1180.3518
2@ = -1305.7943
3@ = 13.7950
end

if 0@ == 8 // Hosp SF
then
1@ = -2680.4097
2@ = 637.1298
3@ = 14.4531
end

if 0@ == 9 // Hosp LV
then
1@ = 1592.6801
2@ = 1816.8179
3@ = 10.8203
end

if 0@ == 10 // ballas
then
1@ = 2017.0066
2@ = -1109.5461
3@ = 26.2031
end

if 0@ == 11 // grove
then
1@ = 2465.0613
2@ = -1710.5726
3@ = 13.5022
end

if 0@ == 12 // aztec
then
1@ = 2170.1987
2@ = -1728.4161
3@ = 13.5409
end

if 0@ == 13 // vaginos
then
1@ = 2766.8125
2@ = -1178.2269
3@ = 69.4036
end

if 0@ == 14 // Rifa
then
1@ = 2786.8208
2@ = -1898.5823
3@ = 11.0657
end

if 0@ == 15 // LCN
then
1@ = 1432.5754
2@ = 2733.1392
3@ = 10.8203
end

if 0@ == 16 // Yakuza
then
1@ = 2549.2310
2@ = 1842.1932
3@ = 10.8203
end

if 0@ == 17 // Rus. Maf
then
1@ = 985.8802
2@ = 1690.6359
3@ = 9.1081
end

if 0@ == 18 // CВ
then
1@ = 397.0686
2@ = 1918.8665
3@ = 17.6406
end

if 0@ == 19 // ВМФ
then
1@ = -2334.5613
2@ = 2367.3196
3@= 5.6221
end

if 0@ == 20 // ВВС
then
1@ = 495.6856
2@ = 2603.2561
3@ = 61.5528
end

if 0@ == 21 // Военком
then
1@ = 1139.3917
2@ = 1382.6759
3@ = 10.8203
end

if 0@ == 22 // Автошкола
then
1@ = -2040.5258
2@ = -104.4789
3@ = 35.1719
end

0AB2: ret 3 1@ 2@ 3@


Выходит ошибка кароч: Неизвестная команда thread "TP"
... просто удали строку