Показать сообщение отдельно
Старый 20.07.2010, 12:03   #4
Новичок
 
Регистрация: 19.07.2010
Сообщений: 6
Сказал Спасибо: 3
Имеет 0 спасибок в 0 сообщенях
Bacek пока неопределено
По умолчанию

Цитата:
Сообщение от Fer123 Посмотреть сообщение
Оффтоп
Не работает (

Код:
var
TimerCycle:integer;
timer:TTimer;

procedure Init;
begin
timer:=TTimer.Create(nil);
timer.interval:=10;
timer.OnTimer:=@OnTimer;
timer.enabled:=false;
TimerCycle:=1; 
end;

procedure OnTimer(Sender: TObject);
begin 
case TimerCycle of
  1:begin   
  buf:=HStr('3E 3E 84 06 10 00 00 00 00');
  sendtoserver;
  Inc(TimerCycle);  
  end; 
  2:begin  
  buf:=HStr('BD 12 00 A1 C5 01 10');
  sendtoserver;
  Inc(TimerCycle);
  timer.interval:=6000;      
  end;
  3:begin  
  buf:=HStr('86 A0 C5 01 10 00 00 00 00');
  sendtoserver;    
  TimerCycle:=1;
  timer.interval:=10;    
  end;      
end;
end;

procedure Free; 
begin
timer.free;
end;

begin
    if FromClient and (pck=HStr('13 0D 00 00 00 00 00 00 00 00')) then timer.enabled:=true; 
    if FromClient and (pck=HStr('13 0C 00 00 00 00 00 00 00 00')) then timer.enabled:=false; 
end.
Таймер не включается (
if FromClient and (pck=HStr('13 0D 00 00 00 00 00 00 00 00')) then
срабатывает но дальше 0 эмоций
Bacek вне форума   Ответить с цитированием