TextDrawSetString

Description

Changes the text on a textdraw.

NameDescription
textThe TextDraw to change
string[]The new string for the TextDraw

Returns

This function does not return any specific values.

Examples

new Text: gMyTextdraw;
public OnGameModeInit()
{
gMyTextdraw = TextDrawCreate(1.0, 5.6, "Hi, how are you?");
return 1;
}
public OnPlayerConnect(playerid)
{
new
message[64],
playerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, playerName, sizeof playerName);
format(message, sizeof(message), "Welcome %s!", playerName);
TextDrawSetString(gMyTextdraw, message);
TextDrawShowForPlayer(playerid, gMyTextdraw);
return 1;
}

Notes

warning

There are limits to the length of textdraw strings - see here for more info.

Related Functions