getPedVoice | Multi Theft Auto: Wiki Skip to content

getPedVoice

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


Gets the current voice of a ped.

Syntax

string,​ string getPedVoice ( ped thePed )
Required Arguments
  • thePed: the ped to get the voice of.

Returns

  • string: value1
  • string: value2

If successul, returns the current voice type name and the voice name of the ped (see ped voices for possible names). Returns false in case of failure.

Code Examples

shared
addCommandHandler ( "getvoice",
function ()
local voicetype, voicename = getPedVoice(localPlayer)
outputChatBox ( "Your ped voice type is " .. tostring(voicetype) .. " and voice name is ".. tostring(voicename).."." )
end
)

See Also