Lumaktaw patungo sa pangunahing content

PlayerTextDrawGetLetterSize

warning

This function was added in omp v1.1.0.2612 and will not work in earlier versions!

Description

Gets the width and height of the letters.

NameDescription
playeridThe ID of the player.
PlayerText:textidThe ID of the player-textdraw to get letter size of.
&Float:widthA float variable into which to store width, passed by reference.
&Float:heightA float variable into which to store height, passed by reference.

Returns

This function does not return any specific values.

Examples

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]);

new Float:width, Float:height;
PlayerTextDrawGetLetterSize(playerid, welcomeText[playerid], width, height);
// width = 3.2
// height = 5.1
return 1;
}