CLEO Help Send last text again

CLEO related

stas

Member
Joined
Nov 20, 2018
Messages
16
Solutions
1
Reaction score
0
I made this code but it doesnt work with commands like /help, it works just with text, can someone help?
 

Attachments

  • sender.cs
    18.1 KB · Views: 5
  • sender.txt
    804 bytes · Views: 12

stas

Member
Joined
Nov 20, 2018
Messages
16
Solutions
1
Reaction score
0
Show me how doing it
now where do i put it?

{$CLEO}
0000:

repeat
wait 0
until SAMP.Available()

alloc 2@ 128

while true
wait 0

if SAMP.ChatInputOpened()
then
alloc 0@ 128
0C11: memset destination 0@ value 0 size 128
0B77: samp get_chat_input_text_to 0@
0C17: 1@ = strlen 0@
format 2@ "%s" 0@
log "%s | %d" 0@ 1@
free 0@
end

if and
not SAMP.ChatInputOpened()
not 1@ == 0
then
0B4E: samp 3@ = get_current_dialog_id
if 8b4c: not samp is_dialog_active 3@
then
log "Waiting for key: %s" 2@
if key_down 75
then
repeat
wait 0
until not key_down 75
say "%s" 2@
end
end
end
END
 

M3D

Active member
Joined
May 22, 2014
Messages
130
Solutions
1
Reaction score
2
PHP:
{$CLEO}
0000:

repeat
wait 0
until SAMP.Available()

alloc 2@ 128

while true
wait 0

    if SAMP.ChatInputOpened()
    then
        alloc 0@ 128
        0C11: memset destination 0@ value 0 size 128
        0B77: samp get_chat_input_text_to 0@
        0C17: 1@ = strlen 0@
        format 2@ "%s" 0@
        log "%s | %d" 0@  1@
        free 0@
    end

     if and
    not SAMP.ChatInputOpened()
    not 1@ == 0
    then
        0B4E: samp 3@ = get_current_dialog_id
        if 8b4c: not samp is_dialog_active 3@
        then   
        log "Waiting for key: %s" 2@
            if key_down 75
            then
                repeat
                wait 0
                until not key_down 75   
                0B76: samp set_chat_input_text 2@
                call @key 1 117{F6}
                call @key 1 13{ENTER}
                {Input window will not be displayed}
            end
        end
    end
END

:key
if 0AA2: 2@ = load_library "User32.dll"
then
if 0AA4: 2@ = get_proc_address "keybd_event" library 2@
then
0AA5: call 2@ num_params 4 pop 0 0 0 0 0@
0AA5: call 2@ num_params 4 pop 0 0 0x02 0 0@
end
end
0AB2: ret 0
 

M3D

Active member
Joined
May 22, 2014
Messages
130
Solutions
1
Reaction score
2
PHP:
{$CLEO}
0000:

repeat
wait 0
until SAMP.Available()

alloc 2@ 128

while true
wait 0

    if SAMP.ChatInputOpened()
    then
        alloc 0@ 128
        0C11: memset destination 0@ value 0 size 128
        0B77: samp get_chat_input_text_to 0@
        0C17: 1@ = strlen 0@
        format 2@ "%s" 0@
        log "%s | %d" 0@  1@
        free 0@
    end

     if and
    not SAMP.ChatInputOpened()
    not 1@ == 0
    then
        0B4E: samp 3@ = get_current_dialog_id
        if 8b4c: not samp is_dialog_active 3@
        then  
        log "Waiting for key: %s" 2@
            if key_down 75
            then
                repeat
                wait 0
                until not key_down 75  
                0B76: samp set_chat_input_text 2@
                call @key 1 117{F6}
                call @key 1 13{ENTER}
                {Input window will not be displayed}
            end
        end
    end
END

:key
if 0AA2: 2@ = load_library "User32.dll"
then
if 0AA4: 2@ = get_proc_address "keybd_event" library 2@
then
0AA5: call 2@ num_params 4 pop 0 0 0 0 0@
0AA5: call 2@ num_params 4 pop 0 0 0x02 0 0@
end
end
0AB2: ret 0


Maybe someone can find the sending message CALL
I tried, but every time I called the game, it crashed
 
Top