SetPedVoice

From Multi Theft Auto: Wiki
Revision as of 23:04, 30 November 2008 by Arc (talk | contribs)
Jump to navigation Jump to search

Changes the voice of a ped.

Syntax

bool setPedVoice ( ped thePed, string voiceType, string voiceName )

Required Arguments

  • thePed: the ped whose voice to change.
  • voiceType: the voice type. See ped voices for possible types.
  • voiceName: the voice name within the specified type. See ped voices for possible voices.

Returns

Returns true when the voice was successfully set, false otherwise.

Example

addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),
    function()
        setPedVoice(getLocalPlayer(), "PED_TYPE_GANG", "VOICE_GNG_MACCER")
    end
)

See Also