GameTextForPlayer

Description

Shows 'game text' (on-screen text) for a certain length of time for a specific player.

NameDescription
playeridThe ID of the player to show the gametext for.
const string[]The text to be displayed.
timeThe duration of the text being shown in milliseconds.
styleThe style of text to be displayed.

Returns

1: The function executed successfully. Success is reported when the style and/or time is invalid. Nothing will happen though (no text displayed). May also cause game crashes.

0: The function failed to execute. This means either the string is null or the player is not connected.

Examples

public OnPlayerDeath(playerid, killerid, reason)
{
GameTextForPlayer(playerid, "Wasted", 5000, 2);
return 1;
}

Notes

warning

Do note that the players may crash because of odd number of tilde (~) symbols used in the game text. Using color codes (e.g. ~r~) beyond the 255th character may crash the client.

Related Functions