HUDClient

beginTextCommandGetNumberOfLinesForString

BEGIN_TEXT_COMMAND_GET_NUMBER_OF_LINES_FOR_STRING0x521FB041D93DD0E4

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

SignatureJavaScript
beginTextCommandGetNumberOfLinesForString(entry: string): void
SignatureLua
beginTextCommandGetNumberOfLinesForString(entry: string)

Usage

JavaScript
beginTextCommandGetNumberOfLinesForString(entry);
Lua
beginTextCommandGetNumberOfLinesForString(entry)

Parameters

ParameterTypeJavaScriptLua
entrystringstringstring

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

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

int GetLineCount(char *text, float x, float y)
    {
     beginTextCommandGetNumberOfLinesForString("STRING");
                addTextComponentSubstringPlayerName(text);
      return beginTextCommandGetNumberOfLinesForString(x, y);
    }

Reference

Namespace
HUD HUD
In the game
void BEGIN_TEXT_COMMAND_GET_NUMBER_OF_LINES_FOR_STRING(const char* entry)
Hash
0x521FB041D93DD0E4
Formerly
_SET_TEXT_GXT_ENTRY _BEGIN_TEXT_COMMAND_LINE_COUNT

Open in the interactive natives reference