I think you need this ...
[shcode=cpp]
{$CLEO .cs}
THREAD "Code"
if
8AF7: get_samp_base_to 0@
then
0A93: end_custom_thread
end
repeat
wait 400
until 0AFA: is_samp_structures_available
WHILE TRUE
WAIT 0
if
0AB0: 114
THEN
if
31@ == 0
then
wait 500
0ACD: show_text_highpriority "Code ~g~ON~w~" time 1337
018C: play_sound 1083 at 0.0 0.0 0.0
31@ = 1
else
wait 500
0ACD: show_text_highpriority "Code ~r~OFF~w~" time 1337
018C: play_sound 1084 at 0.0 0.0 0.0
31@ = 0
end
END
if
31@ == 1
then
if and
0AB0: key_pressed 49
8B21: not samp is_chat_opened
then
///////////////////////////////////////////////////
Your code
///////////////////////////////////////////////////
wait 200
end
if and
0AB0: key_pressed 48
8B21: not samp is_chat_opened
then
///////////////////////////////////////////////////
Your code
///////////////////////////////////////////////////
wait 200
end
///////////////////////////////////////////////////
add more code if u want
///////////////////////////////////////////////////
end // end activate 31@ == 1
END // end loop and all
[/shcode]