PDA

Просмотр полной версии : Проблема


Hous1nG
24.08.2009, 14:17
Вот часть скрипта на анти таргет, ошибка выделена красным цветом.
Помогите пожалуйста исправить ошибку



var act:integer; me1:char; me2:char; me3:char; me4:char; nm:integer; t1:char; t2:char; t3:char; t4:char; nt:integer; shade:integer; mz:integer; pz:integer; tz:integer; hz:integer;
Archer
procedure SendMsg(msg:string);
begin
buf:=#$4A;
WriteD(0);
WriteD(10);
WriteS('');
WriteS(msg);
SendToClient;
end;

begin


//анализ ИД себя

if nm<>1 then
begin
if FromServer and (pck[1]=#$04) then
begin
me1:=pck[18];
me2:=pck[19];
me3:=pck[20];
me4:=pck[21];
nm:= 1;
end;
end;


//защитная часть

if FromClient and (pck[1]=#$1B) and (pck[2]=#$06) then
begin
act:=1;
SendMsg('AT system on');
end;

if FromClient and (pck[1]=#$1B) and (pck[2]=#$05) then
begin
act:=0;
SendMsg('AT system off');
end;

if FromClient and (pck=#$38#$3C#$04#$2B#$00#$00#$00#$03#$00#$00#$00) then
begin
mz:=1;
SendMsg('Advanced m.def on')
end;

if FromClient and (pck=#$38#$3C#$04#$2D#$00#$00#$00#$03#$00#$00#$00) then
begin
mz:=0;
SendMsg('Advanced m.def off')
end;

if FromClient and (pck=#$38#$3F#$04#$2B#$00#$00#$00#$03#$00#$00#$00) then
begin
pz:=1;
SendMsg('Advanced p.def on')
end;

if FromClient and (pck=#$38#$3F#$04#$2D#$00#$00#$00#$03#$00#$00#$00) then
begin
pz:=0;
SendMsg('Advanced p.def off')
end;

if FromClient and (pck=#$38#$42#$04#$2B#$00#$00#$00#$03#$00#$00#$00) then
begin
tz:=1;
SendMsg('Anti-target on')
end;

if FromClient and (pck=#$38#$42#$04#$2D#$00#$00#$00#$03#$00#$00#$00) then
begin
tz:=0;
SendMsg('Anti-target off')
end;

if FromClient and (pck=#$38#$45#$04#$2B#$00#$00#$00#$03#$00#$00#$00) then
begin
hz:=1;
SendMsg('Hit"n"Hide on')
end;

if FromClient and (pck=#$38#$45#$04#$2D#$00#$00#$00#$03#$00#$00#$00) then
begin
hz:=0;
SendMsg('Hit"n"Hide off')
end;

if FromClient and (pck[1]=#$1B) and (pck[2]=#$03) then
begin
buf:=#$48#$00#$00#$FE#$FF#$7F#$AB#$03#$00#$E9#$F1# $FF#$FF#$88#$D4#$00#$00#$00#$00#$00#$00;
SendToServer;
end;

if act=1 then
begin

if tz=1 then
begin
if FromServer and (pck[1]=#$29) and (pck[6] = me1) and (pck[7] = me2) and (pck[8] = me3) and (pck[9] = me4) then
begin
buf:=#$48#$00#$00#$FE#$FF#$7F#$AB#$03#$00#$E9#$F1# $FF#$FF#$88#$D4#$00#$00#$00#$00#$00#$00;
SendToServer;
end;
end;

if mz=1 then
begin
if FromServer and (pck[1]=#$48) and (pck[6] = me1) and (pck[7] = me2) and (pck[8] = me3) and (pck[9] = me4) and (pck[2] <> me1) and (pck[3] <> me2) and (pck[4] <> me3) and (pck[5] <> me4) then
begin
buf:=#$48#$00#$00#$FE#$FF#$7F#$AB#$03#$00#$E9#$F1# $FF#$FF#$88#$D4#$00#$00#$00#$00#$00#$00;
SendToServer;
end;
end;

NLObP
24.08.2009, 14:25
Hous1nG, антитаргет уже не работает. Про SendMsg поищи по форуму (переименуй в SendMsg2)