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

iTz_WEEZY

Известный
298
85
Как правильно пользоваться этим опкодом?
CLEO:
0AE1: 6@ = random_actor_near_point 0@ 1@ 2@ in_radius 3@ find_next 4@ pass_deads 5@
Знаю как юзать координаты, и что в 6@ , а как указывать остальные параметры не понял.
 

Perojek)0

Известный
205
3
CLEO:
{$CLEO}
{$INCLUDE SF}
0000:

repeat
    wait 2000
until 0AFA:  is_samp_available

while true
wait 0
    for 0@ = 0 to 999 step 1
        if
        0B23: samp is_player_connected 0@
        then
        0B20: samp 1@ = actor_handle_by_samp_player_id 0@
            if
            1@==-1
            then
            else
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 53 | store_to 2@ 3@ 4@  
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 52 | store_to 5@ 6@ 7@
            0AB1: call_scm_func @ConvertAndDrawPoly 6 XYZ 2@ 3@ 4@ 5@ 6@ 7@
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 43 | store_to 2@ 3@ 4@  
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 42 | store_to 5@ 6@ 7@
            0AB1: call_scm_func @ConvertAndDrawPoly 6 XYZ 2@ 3@ 4@ 5@ 6@ 7@
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 52 | store_to 2@ 3@ 4@  
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 1 | store_to 5@ 6@ 7@
            0AB1: call_scm_func @ConvertAndDrawPoly 6 XYZ 2@ 3@ 4@ 5@ 6@ 7@
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 42 | store_to 2@ 3@ 4@  
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 1 | store_to 5@ 6@ 7@
            0AB1: call_scm_func @ConvertAndDrawPoly 6 XYZ 2@ 3@ 4@ 5@ 6@ 7@
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 1 | store_to 2@ 3@ 4@  
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 4 | store_to 5@ 6@ 7@
            0AB1: call_scm_func @ConvertAndDrawPoly 6 XYZ 2@ 3@ 4@ 5@ 6@ 7@
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 24 | store_to 2@ 3@ 4@  
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 23 | store_to 5@ 6@ 7@
            0AB1: call_scm_func @ConvertAndDrawPoly 6 XYZ 2@ 3@ 4@ 5@ 6@ 7@
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 23 | store_to 2@ 3@ 4@  
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 22 | store_to 5@ 6@ 7@
            0AB1: call_scm_func @ConvertAndDrawPoly 6 XYZ 2@ 3@ 4@ 5@ 6@ 7@
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 22 | store_to 2@ 3@ 4@  
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 4 | store_to 5@ 6@ 7@
            0AB1: call_scm_func @ConvertAndDrawPoly 6 XYZ 2@ 3@ 4@ 5@ 6@ 7@
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 34 | store_to 2@ 3@ 4@  
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 33 | store_to 5@ 6@ 7@
            0AB1: call_scm_func @ConvertAndDrawPoly 6 XYZ 2@ 3@ 4@ 5@ 6@ 7@
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 33 | store_to 2@ 3@ 4@  
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 32 | store_to 5@ 6@ 7@
            0AB1: call_scm_func @ConvertAndDrawPoly 6 XYZ 2@ 3@ 4@ 5@ 6@ 7@
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 32 | store_to 2@ 3@ 4@  
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 4 | store_to 5@ 6@ 7@
            0AB1: call_scm_func @ConvertAndDrawPoly 6 XYZ 2@ 3@ 4@ 5@ 6@ 7@
            end
        end
    end 
end

:CPed__getBonePosition
0A96: 25@ = actor 0@ struct
0AC7: 26@ = var 26@ offset
0AA6: call_method 0x5E4280 struct 25@ num_params 3 pop 0 updateSkinBones 1 BoneID 1@ outPosition 26@ // CPed__getBonePosition
0AB2: ret 3 X 26@ Y 27@ Z 28@

:ConvertAndDrawPoly
0B55: convert_3D_coords 0@ 1@ 2@ to_screen 25@ 26@
0B55: convert_3D_coords 3@ 4@ 5@ to_screen 27@ 28@
0B68: render draw_line_point1 25@ 26@ point2 27@ 28@ width 1 color 0xFFFFFFFF
0AB2: ret 0
OoAhlZm.png

ifM0swo.png
Че не так? Почему появляются левые линии?

upd:
И такой вопрос. Как можно поставить проверку на выстрел и отследить траекторию пули(ль)?
 
Последнее редактирование:

hnnssy

Известный
Друг
2,684
2,749
CLEO:
{$CLEO}
{$INCLUDE SF}
0000:

repeat
    wait 2000
until 0AFA:  is_samp_available

while true
wait 0
    for 0@ = 0 to 999 step 1
        if
        0B23: samp is_player_connected 0@
        then
        0B20: samp 1@ = actor_handle_by_samp_player_id 0@
            if
            1@==-1
            then
            else
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 53 | store_to 2@ 3@ 4@  
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 52 | store_to 5@ 6@ 7@
            0AB1: call_scm_func @ConvertAndDrawPoly 6 XYZ 2@ 3@ 4@ 5@ 6@ 7@
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 43 | store_to 2@ 3@ 4@  
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 42 | store_to 5@ 6@ 7@
            0AB1: call_scm_func @ConvertAndDrawPoly 6 XYZ 2@ 3@ 4@ 5@ 6@ 7@
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 52 | store_to 2@ 3@ 4@  
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 1 | store_to 5@ 6@ 7@
            0AB1: call_scm_func @ConvertAndDrawPoly 6 XYZ 2@ 3@ 4@ 5@ 6@ 7@
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 42 | store_to 2@ 3@ 4@  
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 1 | store_to 5@ 6@ 7@
            0AB1: call_scm_func @ConvertAndDrawPoly 6 XYZ 2@ 3@ 4@ 5@ 6@ 7@
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 1 | store_to 2@ 3@ 4@  
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 4 | store_to 5@ 6@ 7@
            0AB1: call_scm_func @ConvertAndDrawPoly 6 XYZ 2@ 3@ 4@ 5@ 6@ 7@
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 24 | store_to 2@ 3@ 4@  
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 23 | store_to 5@ 6@ 7@
            0AB1: call_scm_func @ConvertAndDrawPoly 6 XYZ 2@ 3@ 4@ 5@ 6@ 7@
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 23 | store_to 2@ 3@ 4@  
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 22 | store_to 5@ 6@ 7@
            0AB1: call_scm_func @ConvertAndDrawPoly 6 XYZ 2@ 3@ 4@ 5@ 6@ 7@
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 22 | store_to 2@ 3@ 4@  
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 4 | store_to 5@ 6@ 7@
            0AB1: call_scm_func @ConvertAndDrawPoly 6 XYZ 2@ 3@ 4@ 5@ 6@ 7@
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 34 | store_to 2@ 3@ 4@  
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 33 | store_to 5@ 6@ 7@
            0AB1: call_scm_func @ConvertAndDrawPoly 6 XYZ 2@ 3@ 4@ 5@ 6@ 7@
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 33 | store_to 2@ 3@ 4@  
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 32 | store_to 5@ 6@ 7@
            0AB1: call_scm_func @ConvertAndDrawPoly 6 XYZ 2@ 3@ 4@ 5@ 6@ 7@
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 32 | store_to 2@ 3@ 4@  
            0AB1: call_scm_func @CPed__getBonePosition 2 ActorHandle 1@ iBoneID 4 | store_to 5@ 6@ 7@
            0AB1: call_scm_func @ConvertAndDrawPoly 6 XYZ 2@ 3@ 4@ 5@ 6@ 7@
            end
        end
    end 
end

:CPed__getBonePosition
0A96: 25@ = actor 0@ struct
0AC7: 26@ = var 26@ offset
0AA6: call_method 0x5E4280 struct 25@ num_params 3 pop 0 updateSkinBones 1 BoneID 1@ outPosition 26@ // CPed__getBonePosition
0AB2: ret 3 X 26@ Y 27@ Z 28@

:ConvertAndDrawPoly
0B55: convert_3D_coords 0@ 1@ 2@ to_screen 25@ 26@
0B55: convert_3D_coords 3@ 4@ 5@ to_screen 27@ 28@
0B68: render draw_line_point1 25@ 26@ point2 27@ 28@ width 1 color 0xFFFFFFFF
0AB2: ret 0
OoAhlZm.png

ifM0swo.png
Че не так? Почему появляются левые линии?

upd:
И такой вопрос. Как можно поставить проверку на выстрел и отследить траекторию пили(ль)?
Потому что игроки могут находиться у тебя за спиной

Отлавливать буллет синк
 
  • Нравится
Реакции: Perojek)0

4el0ve4ik

Известный
Всефорумный модератор
1,548
1,339
Как сделать, чтобы при создании .ini файла, вписывалась доп. информация?
Пример:
2wOrBLD.png
проверяешь создан ли файл, если файл не создан, то и вписываешь туда весь текст, если хочешь то в лс могу пример привести
 

Garrus

Известный
159
20
Такая проблема: при вызове диалога, сразу срабатывает опкод 0B86: dialog 0@ set_visible 1, хотя он должен ждать, пока я нажму кнопку в диалоге. В чем трабла?)
Код:
0B86: dialog 0@ set_visible 0            
0AC8: 5@ = allocate_memory_size 128
0C11: memset destination 5@ value 0x0 size 128
0AD3: 5@ = format "Кек"
0B3B: samp show_dialog id 15 caption "Кек" text 5@ button_1 "Закрыть" button_2 "" style DIALOG_STYLE_MSGBOX
0AC9: free_allocated_memory 5@
repeat
wait 0
until 0B3C: samp is_dialog_responded id 15 button 4@ list_item 0 input_text 0
0B86: dialog 0@ set_visible 1
 

hnnssy

Известный
Друг
2,684
2,749
Такая проблема: при вызове диалога, сразу срабатывает опкод 0B86: dialog 0@ set_visible 1, хотя он должен ждать, пока я нажму кнопку в диалоге. В чем трабла?)
Код:
0B86: dialog 0@ set_visible 0         
0AC8: 5@ = allocate_memory_size 128
0C11: memset destination 5@ value 0x0 size 128
0AD3: 5@ = format "Кек"
0B3B: samp show_dialog id 15 caption "Кек" text 5@ button_1 "Закрыть" button_2 "" style DIALOG_STYLE_MSGBOX
0AC9: free_allocated_memory 5@
repeat
wait 0
until 0B3C: samp is_dialog_responded id 15 button 4@ list_item 0 input_text 0
0B86: dialog 0@ set_visible 1
CLEO:
0B86: dialog 0@ set_visible 0         
0AC8: 5@ = allocate_memory_size 128
0C11: memset destination 5@ value 0x0 size 128
0AD3: 5@ = format "Кек"
0B3B: samp show_dialog id 15 caption "Кек" text 5@ button_1 "Закрыть" button_2 "" style DIALOG_STYLE_MSGBOX
0AC9: free_allocated_memory 5@
while 0B4C:  samp is_dialog_active 15
wait 0
if 0B3C: samp is_dialog_responded id 15 button 4@ list_item 0 input_text 0
if 4@ == 1
then
0B86: dialog 0@ set_visible 1
break
end
end
end
 
  • Нравится
Реакции: Garrus

Garrus

Известный
159
20
CLEO:
0B86: dialog 0@ set_visible 0        
0AC8: 5@ = allocate_memory_size 128
0C11: memset destination 5@ value 0x0 size 128
0AD3: 5@ = format "Кек"
0B3B: samp show_dialog id 15 caption "Кек" text 5@ button_1 "Закрыть" button_2 "" style DIALOG_STYLE_MSGBOX
0AC9: free_allocated_memory 5@
while 0B4C:  samp is_dialog_active 15
wait 0
if 0B3C: samp is_dialog_responded id 15 button 4@ list_item 0 input_text 0
if 4@ == 1
then
0B86: dialog 0@ set_visible 1
break
end
end
end
Не-а, проблема не решилась(