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

Perojek)0

Известный
205
3
Как можно узнать, на каком символе установлен курсор, если Чат включён, или что-то подобное?
 

#ripper

Новичок
17
0
подскажите плис. показывает неверное расстояние между актерами. соре, может это и вовсе говно код, но я недавно начал увлекаться клео, и не могу понять что не так, уже как второй день.


CLEO:
{$CLEO}
0000:

:reg
wait 0
0AFA:  is_samp_available
jf @reg
0B34: samp register_client_command "cord" to_label @2
//0AC8: 1@ = allocate_memory_size 24

:1
wait 0
0ADC:   test_cheat "x"
jf @1
0B20: samp 2@ = actor_handle_by_samp_player_id 0@
00A0: store_actor $PLAYER_ACTOR position_to 13@ 14@ 16@
00A0: store_actor 2@ position_to 10@ 11@ 12@
050A: 9@ = distance_between_XYZ 10@ 11@ 12@ and_XYZ 13@ 14@ 15@

if and
9@ > 0.0
9@ < 4.0
then
    wait 0
    0AF8: samp add_message_to_chat "%f" color 0xE6E6E6 9@
    0AF8: samp add_message_to_chat "%d" color 0xE6E6E6 0@
    0AF8: samp add_message_to_chat "%s" color 0xE6E6E6 1@
    jump @1
else
    if and
    9@ > 4.0
    9@ < 8.0
    then
        wait 0
        0AF8: samp add_message_to_chat "%f" color 0xE6E6E6 9@
        0AF8: samp add_message_to_chat "%d" color 0xE6E6E6 0@
        0AF8: samp add_message_to_chat "%s" color 0xE6E6E6 1@
        jump @1
    else
        if and
        9@ > 8.0
        9@ < 12.0
        then
            wait 0
            0AF8: samp add_message_to_chat "%f" color 0xE6E6E6 9@
            0AF8: samp add_message_to_chat "%d" color 0xE6E6E6 0@
            0AF8: samp add_message_to_chat "%s" color 0xE6E6E6 1@
            jump @1
        else
            if and
            9@ > 12.0
            9@ < 16.0
            then
                wait 0
                0AF8: samp add_message_to_chat "%f" color 0xE6E6E6 9@
                0AF8: samp add_message_to_chat "%d" color 0xE6E6E6 0@
                0AF8: samp add_message_to_chat "%s" color 0xE6E6E6 1@
                jump @1
            else
                if and
                9@ > 16.0
                9@ < 20.0
                then
                    wait 0
                    0AF8: samp add_message_to_chat "%f" color 0xE6E6E6 9@
                    0AF8: samp add_message_to_chat "%d" color 0xE6E6E6 0@
                    0AF8: samp add_message_to_chat "%s" color 0xE6E6E6 1@
                    jump @1
                else                   
                    0AF8: samp add_message_to_chat "%f" color 0xE6E6E6 9@
                    0AF8: samp add_message_to_chat "%d" color 0xE6E6E6 0@
                    0AF8: samp add_message_to_chat "%s" color 0xE6E6E6 1@
                    jump @1
                end
            end
        end
    end
end

:2
wait 0
0B35: samp 1@ = get_last_command_params
0C1A: 0@ = atoi 1@
0B43: samp cmd_ret
jump @1
 

kraft1k

Вынь х*й из головы и все получится © hnnssy
Друг
1,479
1,163
подскажите плис. показывает неверное расстояние между актерами. соре, может это и вовсе говно код, но я недавно начал увлекаться клео, и не могу понять что не так, уже как второй день.


CLEO:
{$CLEO}
0000:

:reg
wait 0
0AFA:  is_samp_available
jf @reg
0B34: samp register_client_command "cord" to_label @2
//0AC8: 1@ = allocate_memory_size 24

:1
wait 0
0ADC:   test_cheat "x"
jf @1
0B20: samp 2@ = actor_handle_by_samp_player_id 0@
00A0: store_actor $PLAYER_ACTOR position_to 13@ 14@ 16@
00A0: store_actor 2@ position_to 10@ 11@ 12@
050A: 9@ = distance_between_XYZ 10@ 11@ 12@ and_XYZ 13@ 14@ 15@

if and
9@ > 0.0
9@ < 4.0
then
    wait 0
    0AF8: samp add_message_to_chat "%f" color 0xE6E6E6 9@
    0AF8: samp add_message_to_chat "%d" color 0xE6E6E6 0@
    0AF8: samp add_message_to_chat "%s" color 0xE6E6E6 1@
    jump @1
else
    if and
    9@ > 4.0
    9@ < 8.0
    then
        wait 0
        0AF8: samp add_message_to_chat "%f" color 0xE6E6E6 9@
        0AF8: samp add_message_to_chat "%d" color 0xE6E6E6 0@
        0AF8: samp add_message_to_chat "%s" color 0xE6E6E6 1@
        jump @1
    else
        if and
        9@ > 8.0
        9@ < 12.0
        then
            wait 0
            0AF8: samp add_message_to_chat "%f" color 0xE6E6E6 9@
            0AF8: samp add_message_to_chat "%d" color 0xE6E6E6 0@
            0AF8: samp add_message_to_chat "%s" color 0xE6E6E6 1@
            jump @1
        else
            if and
            9@ > 12.0
            9@ < 16.0
            then
                wait 0
                0AF8: samp add_message_to_chat "%f" color 0xE6E6E6 9@
                0AF8: samp add_message_to_chat "%d" color 0xE6E6E6 0@
                0AF8: samp add_message_to_chat "%s" color 0xE6E6E6 1@
                jump @1
            else
                if and
                9@ > 16.0
                9@ < 20.0
                then
                    wait 0
                    0AF8: samp add_message_to_chat "%f" color 0xE6E6E6 9@
                    0AF8: samp add_message_to_chat "%d" color 0xE6E6E6 0@
                    0AF8: samp add_message_to_chat "%s" color 0xE6E6E6 1@
                    jump @1
                else               
                    0AF8: samp add_message_to_chat "%f" color 0xE6E6E6 9@
                    0AF8: samp add_message_to_chat "%d" color 0xE6E6E6 0@
                    0AF8: samp add_message_to_chat "%s" color 0xE6E6E6 1@
                    jump @1
                end
            end
        end
    end
end

:2
wait 0
0B35: samp 1@ = get_last_command_params
0C1A: 0@ = atoi 1@
0B43: samp cmd_ret
jump @1

CLEO:
%.2f