HUDClient

endTextCommandGetNumberOfLinesForString

END_TEXT_COMMAND_GET_NUMBER_OF_LINES_FOR_STRING0x9040DFB09BE75706

The GTA V native END_TEXT_COMMAND_GET_NUMBER_OF_LINES_FOR_STRING of the HUD namespace, as LS:MP client scripts call it: the global function endTextCommandGetNumberOfLinesForString, in JavaScript and in Lua.

SignatureJavaScript
endTextCommandGetNumberOfLinesForString(x: number, y: number): number
SignatureLua
endTextCommandGetNumberOfLinesForString(x: number, y: number): integer

Usage

JavaScript
const result = endTextCommandGetNumberOfLinesForString(x, y);
Lua
local result = endTextCommandGetNumberOfLinesForString(x, y)

Parameters

ParameterTypeJavaScriptLua
xfloatnumbernumber
yfloatnumbernumber

Returns

int JavaScript number, Lua integer

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Determines how many lines the text string will use when drawn on screen.
Must use beginTextCommandGetNumberOfLinesForString for setting up

Reference

Namespace
HUD HUD
In the game
int END_TEXT_COMMAND_GET_NUMBER_OF_LINES_FOR_STRING(float x, float y)
Hash
0x9040DFB09BE75706
Formerly
_GET_TEXT_SCREEN_LINE_COUNT _END_TEXT_COMMAND_GET_LINE_COUNT _END_TEXT_COMMAND_LINE_COUNT

Open in the interactive natives reference