跳到主要内容

PlayerTextDrawGetString

注意

这个函数是在omp v1.1.0.2612中添加的,在以前的版本中不起作用!

描述

获取玩家文本绘图的文本内容

参数名说明
playerid玩家的 ID
PlayerText:textid要获取文本的玩家文本绘图的 ID
string[]用于存储文本的数组,通过引用传递
stringSize = sizeof (string)字符串缓冲区的大小

返回值

该函数不返回特定值。

示例

new PlayerText:welcomeText[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
welcomeText[playerid] = CreatePlayerTextDraw(playerid, 320.0, 240.0, "Hello World!");
PlayerTextDrawShow(playerid, welcomeText[playerid]);

new string[16];
PlayerTextDrawGetString(playerid, welcomeText[playerid], string, sizeof(string));
// 字符串内容为 "Hello World!"
return 1;
}

相关函数