CLEO Help How do i make a key_pressed command in sanny builder?

CLEO related
Status
Not open for further replies.

Wavve

Member
Joined
Dec 14, 2019
Messages
7
Reaction score
0
Location
Romania
So guys, i wanted to make a command that when I press a button like " L ", to send a message on chat.

this is the code i made and it compiles fine but in game it just doesn't work:

if
0AB0: key_press 76 // ( which stands for L )
then
0AF9: samp say_msg "Message"
end

Could you help me please?
Edit: I tried to put this under while true.
 

_Safa

Well-known member
Joined
Sep 22, 2019
Messages
293
Reaction score
98
Location
UGBASE
C++:
{$CLEO .cs}

0000:

REPEAT
WAIT 0
UNTIL 0AFA: SAMP_IS_READY

while true
    if 0AB0: 0x4C 
    then
        0AF9: samp say_msg "xyz-message"
    end
end
 
Status
Not open for further replies.
Top