CLEO Help Preesing Key

CLEO related
Status
Not open for further replies.

Fr0z3n

Well-known member
Joined
Nov 20, 2019
Messages
294
Reaction score
36
Location
Srbija
hello ugbase can anyone tell me how to create a script to press the letter "n" every 10 seconds or if someone can make it I believe it's not very difficult but I don't have much knowledge to make it thanks
 

Ravenous

Active member
Joined
Jan 21, 2016
Messages
61
Reaction score
4
Code:
{$CLEO}
{$INCLUDE SF}
0000: NOP
repeat
wait 50
until 0AFA: is_samp_structures_available
0B34: samp register_client_command "presskey" to_label @activated
31@ = 0
    
while true
wait 0
    if
    31@ == 1
    then
    0AB1: @Set_Virtual_Key 2 KeyOffSet 0x4E time 30
    wait 10000
    end   
end
                    


:activated
0B12: 31@ = 31@ XOR 1
If 31@ == 1
then
0AF8: samp add_message_to_chat "key pressing enabled!" -1
else
0AF8: samp add_message_to_chat "key pressing disabled" -1
end
samp.CmdRet


:Set_Virtual_Key
2@ = 0xB72CC8
0@ *= 2
005A: 2@ += 0@
0A8C: write_memory 2@ size 1 value 255 virtual_protect 0
wait 1@
0A8C: write_memory 2@ size 1 value 0 virtual_protect 0
0AB2: ret 0
 

Ravenous

Active member
Joined
Jan 21, 2016
Messages
61
Reaction score
4
Code:
{$CLEO}
{$INCLUDE SF}
0000: NOP
repeat
wait 50
until 0AFA: is_samp_structures_available
    
while true
wait 0
    if
    key_down 79
    then
    0AB1: @Set_Virtual_Key 2 KeyOffSet 0x4E time 30
    wait 10000
    end   
end
                    

:Set_Virtual_Key
2@ = 0xB72CC8
0@ *= 2
005A: 2@ += 0@
0A8C: write_memory 2@ size 1 value 255 virtual_protect 0
wait 1@
0A8C: write_memory 2@ size 1 value 0 virtual_protect 0
0AB2: ret 0
 
Status
Not open for further replies.
Top