CLEO Help auto press

CLEO related
Status
Not open for further replies.

davidel

Well-known member
Joined
Jan 17, 2020
Messages
207
Reaction score
7
Location
Germania
Code:
{$CLEO .cs}

THREAD 'ExamenTP'

0662: printstring "By Zin"
0662: printstring "UGBASE.EU"

REPEAT
WAIT 0
UNTIL 0AFA:

0B34: samp register_client_command "aaa" to_label @EXAMEN
31@ = FALSE

While True
WAIT 0
If and
31@ == TRUE
056D: actor $PLAYER_ACTOR defined
THEN
 0AB1: @Set_Virtual_Key 2 KeyOffSet 0x59 state 255
 if
 0B4C: samp is_dialog_active -1
 then
 0ab1: @Set_Virtual_Key 2 KeyOffSet 0x59 state 0
    31@ = FALSE
end
end
end

:EXAMEN
0B12: 31@ = 31@ XOR TRUE
SAMP.CmdRet()

:Set_Virtual_Key
{
    255 = true
    0 = false
    0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 255
}
2@ = 0xB72CC8
0@ *= 2
005A: 2@ += 0@  // (int)
0A8C: write_memory 2@ size 1 value 1@ virtual_protect 0
0AB2: ret 0
hello
so, this cleo press automatically key "Y" (which opens an dialog) when /aaa is typed
the problem is that this
{$CLEO .cs}

THREAD 'ExamenTP'

0662: printstring "By Zin"
0662: printstring "UGBASE.EU"

REPEAT
WAIT 0

UNTIL 0AFA:
WHILE TRUE
WAIT 0

IF 0B61: samp is_local_player_spawned
THEN
0AC8: 0@ = allocate_memory_size 260
0AC8: 1@ = allocate_memory_size 260
0B75: samp get_chat_string 99 text_to 0@ prefix_to 1@ color_to 2@ prefix_color_to 3@
IF
0C29: $NOT_USED = stristr string1 0@ string2 "You good"
THEN
0c8f: samp process_chat_input "/aaa" 4@
wait 2000
0AF8: samp add_message_to_chat "Hello budy" color 0xFFFFFF
wait 100
31@ = FALSE
END
END
END
activates the "/aaa"
From that dialog which i have to open i have to buy 3 different items. Sometimes, it buys 2 items and then is not working, it's not opening dialog to buy the 3rd item. But sometimes, it is working completely perfect. What is the problem? I really need to press "Y" to open the dialog every time "Hello budy" shows up.
{$CLEO .cs}

THREAD 'ExamenTP'

0662: printstring "By Zin"
0662: printstring "UGBASE.EU"

REPEAT
WAIT 0

UNTIL 0AFA:
WHILE TRUE
WAIT 0

IF 0B61: samp is_local_player_spawned
THEN
0AC8: 0@ = allocate_memory_size 260
0AC8: 1@ = allocate_memory_size 260
0B75: samp get_chat_string 99 text_to 0@ prefix_to 1@ color_to 2@ prefix_color_to 3@
IF
0C29: $NOT_USED = stristr string1 0@ string2 "Hello budy"
THEN
0c8f: samp process_chat_input "/aaa" 4@

31@ = FALSE
END
END
END
this will type "/aaa" every time hello budy shows up
 
Status
Not open for further replies.
Top