CLEO Help if chat is not opened

CLEO related
Status
Not open for further replies.

Sunny_Forelli

Active member
Joined
May 13, 2013
Messages
85
Reaction score
0
Hi.

I have a problem.
How can I do that, if I click e.g. the key "Y" to not start the mod when the SAMP Chat is open.

I did use this SAMPFUNCS opcode:
0B21: samp is_chat_opened

If I press "Y" in the SAMP Chat the mod should not work.
64mu98qw.png
But I press "Y" when the SAMP Chat is not openend, then the mod should work



Here's the code which is not working the way I want
Code:
:NONAME_27
wait 0 
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@ 
if 
   Car.Defined(0@)
if and
0B21: not samp is_chat_opened         
else_jump @NONAME_95 
Car.StorePos(0@, 3@, 4@, 5@)
Actor.PutAt($PLAYER_ACTOR, 3@, 4@, 5@)
Camera.SetBehindPlayer
0881: set_player $PLAYER_CHAR able_to_shoot_weapons 1
 

xzytro

God
Joined
Apr 1, 2013
Messages
2,294
Reaction score
7
if and
0B21: not samp is_chat_opened       
else_jump @NONAME_95
First off, if you wrote "if and", that means there will be more than 1 condition.
And secondly, the most important part, when you put "not" on a condition, you must change it's number's first digit from 0 to 8. In this case, 0B21 will be 8B21. So it should be like this;

if and
0AB0:  key_pressed 89
8B21: not samp is_chat_opened       
else_jump @somewhere
 

Sunny_Forelli

Active member
Joined
May 13, 2013
Messages
85
Reaction score
0
xzytro link said:
if and
0B21: not samp is_chat_opened       
else_jump @NONAME_95
First off, if you wrote "if and", that means there will be more than 1 condition.
And secondly, the most important part, when you put "not" on a condition, you must change it's number's first digit from 0 to 8. In this case, 0B21 will be 8B21. So it should be like this;

if and
0AB0:  key_pressed 89
8B21: not samp is_chat_opened       
else_jump @somewhere

Thanks man.
It worked! :)
 
Status
Not open for further replies.
Top