So, I made loop but I want it to auto disable when certain message appears on chat.
Here is code, what I do wrong that it doesn't auto stop?
Here is code, what I do wrong that it doesn't auto stop?
Code:
{$CLEO .cs}
0000:
while not SAMP.Available()
wait 100
end
0AC8: 0@ = allocate_memory_size 250
0AC8: 1@ = allocate_memory_size 250
WHILE TRUE
WAIT 0
IF
0AB0: key_pressed 113
THEN
IF
5@ == TRUE
THEN
5@ = FALSE
0AF8: samp add_message_to_chat "Shows toggle message {DC143C}OFF" color -1
ELSE
5@ = TRUE
0AF8: samp add_message_to_chat "Shows toggle message {32CD32}ON" color -1
END
WAIT 350
END
IF
5@ == TRUE
THEN
wait 0
for 30@ = 98 to 99
0B75: samp get_chat_string 30@ text_to 0@ prefix_to 1@ color_to 2@ prefix_color_to 3@
0C26: strupr in 0@ out 1@
if
0C18: 2@ = strstr string1 1@ string2 "When this appears on chat"
then
5@ = FALSE
0AF8: samp add_message_to_chat "Shows toggle message {DC143C}OFF" color -1
wait 5000
Break
end
end
IF
32@ > 9000
THEN
32@ = 0
0AF9: samp say_msg "/thiscommand"
END
END
END