Translations:Virtual/10/ru

From Larnitech wiki page
Jump to navigation Jump to search

Скрипт обработки нажатия

 1u8 state[2] = {0,0};
 2V-ID/142:99
 3{
 4    if (opt(0)==0xff){
 5        if (state[0]==0) state[0] = 1;
 6        else state[0] = 0;
 7    }else (opt(0)==0xfe){
 8     state[0]=state[0];
 9    }else {
10     state[0]=opt(0);
11    }
12 
13    if(opt(1)==0xfe){
14     state[1]=state[1];
15    }else {
16  state[1]=opt(1);
17    }
18    setStatus(142:99,state);  
19}