Skip to content

screen.showGameText

Shows a big message on one player’s screen, or on everyone’s, in one of GTA:SA’s own big-message styles.

Renamed in 0.28 from screen.gameText; see renamed names.

screen.showGameText(text: string, options?: { player?: number | PlayerSnapshot; durationMs?: number; style?: number }): void
Name Type Description
text string The message: ASCII, up to 255 characters. The game’s ~r~ (color) and ~n~ (new line) codes work.
options.player PlayerTarget Optional. A session-bound player or current ID; leave it out for everyone.
options.durationMs number Optional. How long, up to 60000 (60 seconds). Defaults to 3000.
options.style number Optional. The game’s style, 0 to 6. Defaults to 0.

Nothing. Invalid text/options and stale sends are dropped. Stale sends increment the staleActions diagnostic; see Async handlers.

gamemodes/my-mode.ts
import { commands, screen } from "nativemp";
commands.register("win", (player) => {
screen.showGameText("~g~Mission passed!", { player, durationMs: 4000 });
});
Style Looks
0 Large, in the middle
1 Bottom right
2 White, in the middle. It replaces a “Wasted” or “Busted” on screen, which then stays away for the rest of that death or arrest.
3 Smaller
4 Smaller, higher up
5 Small and white
6 Light blue, at the top