Избранное ASI SAMPFUNCS

Статус
В этой теме нельзя размещать новые ответы.

yamych

Новичок
20
0
Все делаю как написано и все ровно ''неизвестный плагин.. и так далее''.Поможет кто?
 

itsLegend

Фонд борьбы за жуков 🐞
Администратор
2,696
1,462
Не знаю почему, но работает только так:
Код:
{$CLEO}
 
0000:
 
if
    8AF7: get_samp_base_to 0@
then
    0A93: end_custom_thread
end
repeat
    wait 400
until 0AFA: is_samp_structures_available
 
 
while true
    wait 0
    while 0B3C: samp dialog_respond 1@ button 2@ list_item 3@ input_text 0
        wait 0
        0AD1: show_formatted_text_highpriority "ID: ~R~%d ~W~| Button: ~R~%d ~W~| Item: ~R~%d" time 2500 1@ 2@ 3@
    end
end

т.е. просто выводит ID, Buton, List Item, если, к примеру, сделаю так:
Код:
{$CLEO}
 
0000:
 
if
    8AF7: get_samp_base_to 0@
then
    0A93: end_custom_thread
end
repeat
    wait 400
until 0AFA: is_samp_structures_available
 
0B34: samp register_client_command "bind565" to_label @1
 
while true
    wait 0
    while 0B3C: samp dialog_respond 1@ button 2@ list_item 3@ input_text 0
        wait 0
        0AD1: show_formatted_text_highpriority "ID: ~R~%d ~W~| Button: ~R~%d ~W~| Item: ~R~%d" time 2500 1@ 2@ 3@
        if 1@ == 565
        then
            if 2@ == 1
            jf continue
           
            if 3@ == 0
            then 0ACD: show_text_highpriority "Work!" time 2500
            end
        end
    end
end
 
:1
0AC6: 23@ = label @list offset
0B3B: samp show_dialog id 565 caption "{FFFF00}Binder Test" text 23@ button_1 "Выбрать" button_2 "Закрыть" style 2
SAMP.CmdRet()
 
:list
hex
    "{FFFF00}Тест" 00
end
то уже нихера не работает, ни получение ID диалога, кнопки, т.е. не возвращает true.
Это баг новой версии или я что-то не так делаю?

Пробовал через оператор if , такая же херня :(
 

FYP

Известный
Автор темы
Администратор
1,758
5,732
Не знаю почему, но работает только так:
Код:
{$CLEO}
 
0000:
 
if
    8AF7: get_samp_base_to 0@
then
    0A93: end_custom_thread
end
repeat
    wait 400
until 0AFA: is_samp_structures_available
 
 
while true
    wait 0
    while 0B3C: samp dialog_respond 1@ button 2@ list_item 3@ input_text 0
        wait 0
        0AD1: show_formatted_text_highpriority "ID: ~R~%d ~W~| Button: ~R~%d ~W~| Item: ~R~%d" time 2500 1@ 2@ 3@
    end
end

т.е. просто выводит ID, Buton, List Item, если, к примеру, сделаю так:
Код:
{$CLEO}
 
0000:
 
if
    8AF7: get_samp_base_to 0@
then
    0A93: end_custom_thread
end
repeat
    wait 400
until 0AFA: is_samp_structures_available
 
 
while true
    wait 0
    while 0B3C: samp dialog_respond 1@ button 2@ list_item 3@ input_text 0
        wait 0
        0AD1: show_formatted_text_highpriority "ID: ~R~%d ~W~| Button: ~R~%d ~W~| Item: ~R~%d" time 2500 1@ 2@ 3@
        if 1@ == 565
        then
            if 2@ == 1
            jf continue
       
            if 3@ == 0
            then 0ACD: show_text_highpriority "Work!" time 2500
            end
        end
    end
end
то уже нихера не работает, ни получение ID диалога, кнопки, т.е. не возвращает true.
Это баг новой версии или я что-то не так делаю?

Пробовал через оператор if , такая же херня :(

а где создание самого диалога? этот опкод реагирует только на диалоги, созданные sampfuncs'ом.
 

itsLegend

Фонд борьбы за жуков 🐞
Администратор
2,696
1,462
а где создание самого диалога? этот опкод реагирует только на диалоги, созданные sampfuncs'ом.
Ах, да. Минуту.

Исправил.
Код:
{$CLEO}
 
0000:
 
if
    8AF7: get_samp_base_to 0@
then
    0A93: end_custom_thread
end
repeat
    wait 400
until 0AFA: is_samp_structures_available
 
0B34: samp register_client_command "bind565" to_label @1
 
while true
    wait 0
    while 0B3C: samp dialog_respond 1@ button 2@ list_item 3@ input_text 0
        wait 0
        0AD1: show_formatted_text_highpriority "ID: ~R~%d ~W~| Button: ~R~%d ~W~| Item: ~R~%d" time 2500 1@ 2@ 3@
        if 1@ == 565
        then
            if 2@ == 1
            jf continue
 
            if 3@ == 0
            then 0ACD: show_text_highpriority "Work!" time 2500
            end
        end
    end
end
 
:1
0AC6: 23@ = label @list offset
0B3B: samp show_dialog id 565 caption "{FFFF00}Binder Test" text 23@ button_1 "Выбрать" button_2 "Закрыть" style 2
SAMP.CmdRet()
 
:list
hex
    "{FFFF00}Тест" 00
end

Ниже :(
 

itsLegend

Фонд борьбы за жуков 🐞
Администратор
2,696
1,462
И снова продублирую мой вопрос...
Как-то странно.
Вот этот скрипт не работает...:
Код:
{$CLEO}
 
const
    DIALOG_STYLE_MSGBOX = 0
    DIALOG_STYLE_INPUT = 1
    DIALOG_STYLE_LIST = 2
    DIALOG_STYLE_PASSWORD = 3
end
 
0000:
 
if
    8AF7: get_samp_base_to 0@
then
    0A93: end_custom_thread
end
repeat
    wait 400
until 0AFA: is_samp_structures_available
 
0B34: samp register_client_command "bindvvs" to_label @1
 
while true
    wait 0
    if 00EC:  actor $PLAYER_ACTOR sphere 0 near_point 402.7311 2543.3948 radius 0.1 0.1
    then
        0AF9: say "/me взял бронежилет"
        wait 800
        0AF9: say "/do бронежилет в руках"
        wait 500
        0AF9: say "/me одел бронежилет"
    end
 
    if 0B3C: samp dialog_respond 1@ button 2@ list_item 3@ input_text 0
    then
        if
            1@ == 647
        then
            if
                2@ == 1
            then
                if
                    3@ == 0
                then
                    0AF9: say "/me положил М4 на стол"
                    wait 1250
                    0AF9: say "/me отделил магазин"
                    wait 1250
                    0AF9: say "/me вынул пинал из гнезда приклада"
                    wait 1250
                    0AF9: say "/me отделил шомпол"
                    wait 1250
                    0AF9: say "/me отделил крышку ствольной коробки"
                    wait 1250
                    0AF9: say "/me отделил возвратный механизм"
                    wait 1250
                    0AF9: say "/me отделил затворную раму с затвором"
                    wait 1250
                    0AF9: say "/me отделил затвор от затворной рамы"
                    wait 1250
                    0AF9: say "/me отделил газовую трубку со стальной накладкой"
                    wait 1500
                    0AF9: say "/me почистил канал ствола"
                    wait 1500
                    0AF9: say "/me промыл газовую трубку"
                end
   
                if
                    3@ == 1
                then
                    0AF9: say "/do M4 в руках"
                    wait 1250
                    0AF9: say "/me промыл газовую трубку"
                    wait 1250
                    0AF9: say "/me почистил канал ствола"
                    wait 1250
                    0AF9: say "/me прикрепил газовую трубку со стальной накладкой"
                    wait 1250
                    0AF9: say "/me прикрепил затвор от затворной рамы"
                    wait 1250
                    0AF9: say "/me прикрепил затворную раму с затвором"
                    wait 1250
                    0AF9: say "/me прикрепил возвратный механизм"
                    wait 1250
                    0AF9: say "/me прикрепил крышку ствольной коробки"
                    wait 1250
                    0AF9: say "/me прикрепил шомпол"
                    wait 1250
                    0AF9: say "/me засунул пинал в гнездо приклада"
                    wait 1500
                    0AF9: say "/me прикрепил магазин"
                    wait 1500
                    0AF9: say "/me положил М4 на стол"
                end
   
                if
                    3@ == 2
                then
                    // stop
                end
               
                if
                    3@ == 3
                then
                    0AF9: say "/me ввёл код"
                    wait 1200
                    0AF9: say "/me нажал на кнопку"
                    wait 800
                    0AF9: say "/gate"
                end
            end
        end
    end
end
 
:1
0AC6: 23@ = label @list offset
0B3B: samp show_dialog id 647 caption "{FFFF00}Биндер: {00FF00}ВВС" text 23@ button_1 "Выбрать" button_2 "Закрыть" style 2
SAMP.CmdRet()
 
:list
hex
    "{FFFF00}Разбор" 20 "M4" A
    "{FFFFA1}Сбор" 20 "M4" A
    "{FFFF00}Присяга" A
    "{FFFFA1}Открыть/закрыть" 20 "ворота" 00
end

После выбора одного из пунктов, просто напросто закрывается диалог и ничего не происходит.

UPD:
Какой-то из левых скриптов блочит...
Проблему окончательно решил :D
 

itsLegend

Фонд борьбы за жуков 🐞
Администратор
2,696
1,462
Ошибка в classes.db:
Код:
 ^SetGameState,[0B27,=,1,2,0],("GameState: ^WAIT_CONNECT=1^AWAIT_JOIN^CONNECTING^CONNECTED^RESTARTING^DISCONNECTED" "%i")

Исправил на это:
Код:
SetGameState,0B27,0,0,("GameState%i")

Ну или на это:
Код:
SetGameState,0B27,0,0,("GameState: ^WAIT_CONNECT=1^AWAIT_JOIN^CONNECTING^CONNECTED^RESTARTING^DISCONNECTED")
 
  • Нравится
Реакции: FYP
Статус
В этой теме нельзя размещать новые ответы.