monday said:during these 10 seconds the user won't be able to toggle though... It would be better to use 32@ or 33@ timer I think
{$CLEO .cs}
0000:
REPEAT
WAIT 0
UNTIL 0AFA: SAMP_IS_READY
32@ = 0 // 32@ will increase by 1 per each millisecond (33@ works the same, 32@ and 33@ are special variables used for timing)
WHILE TRUE
WAIT 0
IF 0AB0: 111 {Num /}
THEN
IF 31@ == FALSE
THEN
WAIT 500
0AF8: samp add_message_to_chat "{FFF700}Activated" color 0xFFF700
31@ = TRUE
{ here you could also put:
32@ = 0 //to prevent " TEXT 1" being said at the moment of activation
32@ = 10000 //to say " TEXT 1" when you activate it
}
ELSE
WAIT 500
0AF8: samp add_message_to_chat "{FFF700}De - activated" color 0xFFF700
31@ = FALSE
END
END
IF AND
31@ == TRUE
32@ > 10000 // only if 10 seconds have passed
THEN
say " TEXT 1"
32@ = 0 // reset the timer
END
END