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

Простенькая функция динамической проверки на Save

Only working scripts
Gorn
Neophyte
Neophyte
Posts: 19
Joined: 19.05.2005 9:18

Post by Gorn »

Code: Select all

Function AuthorMessageBetweenTimes(Str : String; TimeBegin,TimeEnd : TDateTime; AuthorID : Cardinal) : Integer;
var tmp : Integer;
Begin
    repeat
       tmp := InJournalBetweenTimes(Str, TimeBegin, TimeEnd);
       if ( (tmp > -1) and (AuthorID <> LineID) ) then
          SetJournalLine(tmp, '')
       else
          break;
    until false;
    Result := tmp;
End;

Function SystemMessageBetweenTimes(Str : String; TimeBegin,TimeEnd : TDateTime) : Integer;
var tmp : Integer;
Begin
    repeat
       tmp := InJournalBetweenTimes(Str, TimeBegin, TimeEnd);
       if ( (tmp > -1) and (LineName <> 'System') ) then
          SetJournalLine(tmp, '')
       else
          break;
    until false;
    Result := tmp;
End;
Проверить возможности не было, так что не бейте, если вдруг не заработает...
Post Reply