quinta-feira, 31 de julho de 2008

Alert When GM Messages

Const
Path = 'C:/Windows/Media/Notify.wav' // Must be wav file!
procedure event_message(Channel:integer; Name,Text:String);
begin
UpdateWorld;
Name1 := Name;
if (Name1[2] = 'M') and ((Name1[0] = 'G') or (Name1[0]='C')) then
begin
PlaySound(Path);
end;
end;

while not terminated do
begin
UpdateWorld;
ProcessEvents;
sleep(100);
end;

0 Comments: