Lewin? Krom? I desperately need a hand.

The problem is you never set DelayedTime to anything, you only ever compare its value to something else, so it will be uninitialised. When you set DelayedErase to true you need to set DelayedTime to something as well. But I'm not sure you have the condition right anyway:
(DelayedTime = (States.GameTime + DELAY))
should probably be:
(States.GameTime = DelayedTime)
Then when you show a message you can set:
DelayedTime := States.GameTime + DELAY
So that means "DelayedTime" means "What tick should we erase the message?" (now + 50 ticks). When you reach that tick you erase it.
Also, I noticed that you're not initialising any of your global variables. Given that your script works, it looks like the compiler initialises them all to zero or false anyway (or you're just lucky that the memory allocated to them was already zero), but it's good practice to initialise them. Add something like this:
- Code:
procedure OnMissionStart;
begin
Message0Sent := False;
DelayedErase := False;
....
end;
Then it's clear to someone reading your script what the global variables all start as.
Another tip, replace this:
- Code:
procedure ShowMsgToPlayers(aMsg: Integer);
begin
Actions.ShowMsg(0, States.Text(aMsg))
Actions.ShowMsg(1, States.Text(aMsg))
Actions.ShowMsg(2, States.Text(aMsg))
Actions.ShowMsg(3, States.Text(aMsg))
end;
with this:
- Code:
procedure ShowMsgToPlayers(aMsg: Integer);
var I: Integer;
begin
for I := 0 to 3 do
Actions.ShowMsg(I, States.Text(aMsg));
end;
There's so many places where you do something to all 4 players in your code which could be done using a for loop. It's easier to read, easier to change later, and harder to make mistakes (otherwise the code could be slightly different for each player and you might not notice).
Cheers,
Lewin.