HUDClient

getCharacterFromAudioConversationFilenameBytes

GET_CHARACTER_FROM_AUDIO_CONVERSATION_FILENAME_BYTES0xCE94AEBA5D82908A

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

SignatureJavaScript
getCharacterFromAudioConversationFilenameBytes(
  text: string,
  startPosition: number,
  endPosition: number
): string
SignatureLua
getCharacterFromAudioConversationFilenameBytes(
  text: string,
  startPosition: integer,
  endPosition: integer
): string

Usage

JavaScript
const result = getCharacterFromAudioConversationFilenameBytes(text, startPosition, endPosition);
Lua
local result = getCharacterFromAudioConversationFilenameBytes(text, startPosition, endPosition)

Parameters

ParameterTypeJavaScriptLua
textstringstringstring
startPositionintnumberinteger
endPositionintnumberinteger

Returns

string JavaScript string, Lua string

Notes

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

Returns a substring that is between two specified positions. The length of the string will be calculated using (endPosition - startPosition).

Example:

// Get "STRING" text from "MY_STRING"
subStr = getCharacterFromAudioConversationFilenameBytes("MY_STRING", 3, 9);
// Overflows are possibly replaced with underscores (needs verification)
subStr = getCharacterFromAudioConversationFilenameBytes("MY_STRING", 3, 10); // "STRING_"?

Reference

Namespace
HUD HUD
In the game
const char* GET_CHARACTER_FROM_AUDIO_CONVERSATION_FILENAME_BYTES(const char* text, int startPosition, int endPosition)
Hash
0xCE94AEBA5D82908A
Formerly
_GET_TEXT_SUBSTRING_SLICE

Open in the interactive natives reference