Przejdź do głównej zawartości

TextDrawGetLetterSize

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
Text:textidThe ID of the 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 Text:gMyTextdraw;

public OnGameModeInit()
{
gMyTextdraw = TextDrawCreate(100.0, 33.0,"Example TextDraw");
TextDrawLetterSize(gMyTextdraw, 3.2, 5.1);

new Float:width, Float:height;
TextDrawGetLetterSize(gMyTextdraw, width, height);
// The `width` will be '3.2' and `height` will be '5.1'
return 1;
}