Skip to main content

DrawTextInline

This function was added in DSL 1

Description

Draws text on the screen in a specified style for a given duration.

This function is useful for displaying temporary messages or objectives to the player.

function DrawTextInline(text, duration, style) --[[ ... ]] end

Parameters

  • text: string - The text to be drawn.
  • duration: number - The duration for which the text should be displayed, 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

None.

Example

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

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

See Also