Skip to main content

TextDrawSetString

คำอธิบาย

Changes the text on a textdraw.

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

ส่งคืน

This function does not return any specific values.

ตัวอย่าง

new Text:himessage;

public OnGameModeInit()
{
himessage = TextDrawCreate(1.0, 5.6, "Hi, how are you?");
return 1;
}

public OnPlayerConnect(playerid)
{
new newtext[41], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(newtext, sizeof(newtext), "Hi %s, how are you?", name);
TextDrawSetString(himessage, newtext);
TextDrawShowForPlayer(playerid, himessage);
return 1;
}

บันทึก

warning

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

ฟังก์ชั่นที่เกี่ยวข้องกัน