முதன்மை உள்ளடக்கத்துக்குச் செல்லவும்

PlayerTextDrawGetTextSize

எச்சரிக்கை

செயல்பாடு என்பது omp v1.1.0.2612 பதிப்பில் சேர்க்கப்பட்டது. இது முந்தைய பதிப்புகளில் இயங்காது!

Description​

Gets the X axis and Y axis of the player-textdraw text size.

NameDescription
playeridThe ID of the player.
Text:textidThe ID of the textdraw to get text 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");
PlayerTextDrawTextSize(playerid, welcomeText[playerid], 2.0, 3.6);
PlayerTextDrawShow(playerid, welcomeText[playerid]);

new Float:width, Float:height;
PlayerTextDrawGetTextSize(playerid, welcomeText[playerid], width, height);
// width = 2.0
// height = 3.6
return 1;
}