Official Soldat Forums

Server Talk => Scripting Discussions and Help => Topic started by: skrX on March 24, 2016, 05:07:39 am

Title: multi-color text
Post by: skrX on March 24, 2016, 05:07:39 am
I would like to present to you the way through which you can write in one line using two different colors.

Code: [Select]
function Line(j: integer): string;
var
 i: integer;
begin
for i := 1 to j do
Result := Result + chr(10) + chr(13);
end;

Usage
Code: [Select]
Player.WriteConsole(Line(1)+'    bbb',$66FF00);
Player.WriteConsole('AAA',$FFFFFF);
Player.WriteConsole(Line(1)+'    ccc',$00FFFF);
Player.WriteConsole('DDD',$66FF00);

Result
(http://i66.tinypic.com/fn9xye_th.png)

If you have any other ways, please share.