跳到主要内容

PlayerTextDrawLetterSize

描述

设置玩家文本绘图中字符的宽度和高度

参数名说明
playerid要设置字符尺寸的玩家 ID
PlayerText:textid要修改字符尺寸的玩家文本绘图的 ID
Float:width字符宽度(浮点型)
Float:height字符高度(浮点型)

返回值

该函数不返回特定值。

示例

new PlayerText:welcomeText[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
welcomeText[playerid] = CreatePlayerTextDraw(playerid, 320.0, 240.0, "Welcome to my OPEN.MP server");
PlayerTextDrawLetterSize(playerid, welcomeText[playerid], 3.2, 5.1);

PlayerTextDrawShow(playerid, welcomeText[playerid]);
return 1;
}

注意事项

提示

当仅需要调整文本绘图方框大小时,可将 Y 值乘以 0.135 来获得类似 TextDrawTextSize 的效果

提示

字体显示效果最佳比例为 X:Y = 1:4(例如 X 设为 0.5 时,Y 应设为 2)

相关函数