- Documentation
- Server functions
- getPedVoice
Function
getPedVoice
Returns the voice bank type and name stored with setPedVoice. Returns false when no voice was set.
Syntax
string, string getPedVoice(ped ped)Arguments
pedped- A player or an NPC.
Returns
Type and name, or false.
Example
local vtype, vname = getPedVoice(npc)
See also
setPedVoiceStores a voice bank type and name for a ped (e.g. type"PED_TYPE_GEN"and name"VOICE_GEN_BBDYG1"). The value is for scripts and comes back fromgetPedVoice; the Definitive Edition game does not change the ped's lines based on it yet. Custom lines can be played withplayPedVoiceLineand a client script.resetPedVoiceRemoves the voice stored withsetPedVoice, i.e. returns the ped to its model's original voice. AfterwardsgetPedVoicereturnsfalse.