Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7

delphi seteventproc question

Ask for help
Post Reply
980333
Posts: 9
Joined: 18.03.2015 11:36

delphi seteventproc question

Post by 980333 »

Code: Select all

procedure eventMapMessage(ID: Cardinal; centerX, centerY: Integer);
begin
  xMap := centerX;
  yMap := centerY;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
 script.SetEventProc(TPacketEvent.evMapMessage,@eventMapMessage);
end;
but this code don't work,8 years i have never used Delphi
and how get mount/dismount static
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: delphi seteventproc question

Post by Vizit0r »

visually all is ok.
what's you mean "don't work" ?

and about static write question normally.
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
980333
Posts: 9
Joined: 18.03.2015 11:36

Re: delphi seteventproc question

Post by 980333 »

sorry,i want get mount/dismount status,not static
on delphi i call SetEventProc function after,in game click Treasure map,eventMapMessage function dont work
980333
Posts: 9
Joined: 18.03.2015 11:36

Re: delphi seteventproc question

Post by 980333 »

in delphi,i SetEventProc after,fster useobject Treasure map, eventMapMessage dont work,second useobject Treasure map,eventMapMessage can work,but SetEventProc after,in game click terasure map,eventMapMessge dont work
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: delphi seteventproc question

Post by Vizit0r »

980333 wrote:sorry,i want get mount/dismount status,not static
check HorseLayer - if nil - mean you have no mount.


about event - give me char for test
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
Post Reply