Skip to main content

TextPrintString

Description

Prints non-localised text on the screen.
Every game version other than PS2 prints text in red regardless of style.

info
  • (DSL 10) style now follows PS2 colours.
function TextPrintString(text, duration, style) --[[ ... ]] end

Parameters

  • text: string - The text to be drawn.
  • duration: number - Text duration, in seconds.
  • style: 1|2 - The style of the text:
    • 1: Objective style (yellow text, top-center)
    • 2: Subtitle style (white text, small, bottom-center)

Return Values

...

Example

Displays "Hello, world!" for 5 seconds in objective style

TextPrintString('Hello, world!', 5, 1)