Everything works fine but I can't deactivate this script; once I press "X" it keeps looping over and over. I do need it to loop but I also want to be able to stop it whenever I wish, and I need those delays too (2 seconds for the first command and 11 seconds for the second command).
PHP:
{$CLEO .cs}
0000: NOP
WAIT 10000
WHILE TRUE
WAIT 0
IF
0@ == TRUE
THEN
WAIT 2000
0C8F: samp process_chat_input "/getmats"
WAIT 11000
0C8F: samp process_chat_input "/cps"
END
IF 0AB0: key_pressed 88 {X}
THEN
IF
0@ == FALSE
THEN
0@ = TRUE
0AD1: "ON" 1337
ELSE
0@ = FALSE
0AD1: "OFF" 1337
END
END
END