AudioClient

doesContextExistForThisPed

DOES_CONTEXT_EXIST_FOR_THIS_PED0x49B99BF3FDA89A7A

The GTA V native DOES_CONTEXT_EXIST_FOR_THIS_PED of the AUDIO namespace, as LS:MP client scripts call it: the global function doesContextExistForThisPed, in JavaScript and in Lua.

SignatureJavaScript
doesContextExistForThisPed(ped: Ped, speechName: string, p2: boolean): boolean
SignatureLua
doesContextExistForThisPed(ped: Ped, speechName: string, p2: boolean): boolean

Usage

JavaScript
const result = doesContextExistForThisPed(ped, speechName, p2);
Lua
local result = doesContextExistForThisPed(ped, speechName, p2)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
speechNamestringstringstring
p2BOOLbooleanboolean

Returns

BOOL JavaScript boolean, Lua boolean

Notes

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

Checks if the ped can play the speech or has the speech file, p2 is usually false.

Reference

Namespace
Audio AUDIO
In the game
BOOL DOES_CONTEXT_EXIST_FOR_THIS_PED(Ped ped, const char* speechName, BOOL p2)
Hash
0x49B99BF3FDA89A7A
Formerly
_CAN_PED_SPEAK

Open in the interactive natives reference