CLEO Help If chat is opened, keybind stop working

CLEO related

Costin.

Member
Joined
Jul 7, 2021
Messages
9
Reaction score
3
Location
Romania
Hello, i'm looking for a code to stop working the cleo when chat is opened. I want to make it work only when it's closed.
Code:
// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

0000: NOP

:NONAME_2
wait 10
0AB4: 1@ = var 6
if and
   not 1@ == 1
key_down 20
   Actor.Driving($PLAYER_ACTOR)
jf @NONAME_2
0@ = Actor.CurrentCar($PLAYER_ACTOR)
07D5: set_car 0@ velocity_in_direction_XYZ 0.0 0.0 0.2 rotation_velocitiesXY 0.0 0.0 unk 0.0
wait 200
jump @NONAME_2
 

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
270
Location
Pluto
PHP:
...
if and
    not 1@ == 1
    key_down 20
    Actor.Driving($PLAYER_ACTOR)
    8B21: not samp is_chat_opened
...
Note: Requires SAMPFUNCS and its SDK. Read this topic for more information about adding SF SDK to SB.
 

0x73616D

Active member
Joined
Apr 18, 2021
Messages
135
Solutions
1
Reaction score
68
Location
0x73616D
Hello, i'm looking for a code to stop working the cleo when chat is opened. I want to make it work only when it's closed.
Code:
// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

0000: NOP

:NONAME_2
wait 10
0AB4: 1@ = var 6
if and
   not 1@ == 1
key_down 20
   Actor.Driving($PLAYER_ACTOR)
jf @NONAME_2
0@ = Actor.CurrentCar($PLAYER_ACTOR)
07D5: set_car 0@ velocity_in_direction_XYZ 0.0 0.0 0.2 rotation_velocitiesXY 0.0 0.0 unk 0.0
wait 200
jump @NONAME_2
Without SAMPFUNCS, SA-MP R1
PHP:
0AB1: @isChatClosed 0

PHP:
:isChatClosed
0AA2: 1@ = "samp.dll"
1@ += 0x21A0E8
0A8D: 1@ = readMem 1@ sz 4 vp 0
1@ += 0x14E0
0A8D: 1@ = readMem 1@ sz 4 vp 0
if not 1@ <> 0
then
    0485: chat_closed
else
    059A: chat_open
end
0AB2: ret 0
SA-MP R4
PHP:
:isChatClosed
0AA2: 1@ = "samp.dll"
1@ += 0x26E9FC
0A8D: 1@ = readMem 1@ sz 4 vp 0
1@ += 0x14E0
0A8D: 1@ = readMem 1@ sz 4 vp 0
if not 1@ <> 0
then
    0485: chat_closed
else
    059A: chat_open
end
0AB2: ret 0
 
Top