SetPedVoice: Difference between revisions
Jump to navigation
Jump to search
m (fix link) |
|||
(One intermediate revision by one other user not shown) | |||
Line 3: | Line 3: | ||
Changes the voice of a ped. | Changes the voice of a ped. | ||
{{Note|A ped voice is one of the GTA built in voice character types. Not to be confused with a [[ | {{Note|A ped voice is one of the GTA built in voice character types. Not to be confused with a [[Resource:Voice|player voice]].}} | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">bool setPedVoice ( ped thePed, string voiceType, string voiceName )</syntaxhighlight> | <syntaxhighlight lang="lua">bool setPedVoice ( ped thePed, string voiceType, string voiceName )</syntaxhighlight> | ||
Line 17: | Line 17: | ||
===Example=== | ===Example=== | ||
<syntaxhighlight lang="lua">addEventHandler("onClientResourceStart", | <syntaxhighlight lang="lua">addEventHandler("onClientResourceStart", resourceRoot, | ||
function() | function() | ||
setPedVoice( | setPedVoice(localPlayer, "PED_TYPE_GANG", "VOICE_GNG_MACCER") | ||
end | end | ||
)</syntaxhighlight> | )</syntaxhighlight> |
Latest revision as of 20:43, 15 December 2021
Changes the voice of a ped.
Syntax
bool setPedVoice ( ped thePed, string voiceType, string voiceName )
OOP Syntax Help! I don't understand this!
- Method: ped:setVoice(...)
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", resourceRoot, function() setPedVoice(localPlayer, "PED_TYPE_GANG", "VOICE_GNG_MACCER") end )
See Also
- canPedBeKnockedOffBike
- getPedAnalogControlState
- getPedAnimation
- getPedBonePosition
- getPedCameraRotation
- getPedControlState
- getPedMoveState
- getPedOxygenLevel
- getPedSimplestTask
- getPedTargetCollision
- getPedTargetEnd
- getPedTargetStart
- getPedTask
- getPedVoice
- getPedWeaponMuzzlePosition
- givePedWeapon
- isPedBleeding
- isPedDoingTask
- isPedReloadingWeapon
- isPedTargetingMarkerEnabled
- setAnalogControlState
- setPedAimTarget
- setPedAnalogControlState
- setPedBleeding
- setPedCameraRotation
- setPedCanBeKnockedOffBike
- setPedControlState
- setPedEnterVehicle
- setPedExitVehicle
- IsPedFootBloodEnabled
- setPedFootBloodEnabled
- setPedLookAt
- setPedOxygenLevel
- setPedTargetingMarkerEnabled
- setPedVoice
- Shared
- addPedClothes
- getPedClothes
- removePedClothes
- createPed
- getPedAmmoInClip
- getPedArmor
- getPedFightingStyle
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedStat
- getPedTarget
- getPedTotalAmmo
- getPedWalkingStyle
- getPedWeapon
- getPedWeaponSlot
- getPedContactElement
- getValidPedModels
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDucked
- isPedHeadless
- isPedInVehicle
- isPedOnFire
- isPedOnGround
- isPedWearingJetpack
- killPed
- removePedFromVehicle
- setPedAnimation
- setPedAnimationProgress
- setPedAnimationSpeed
- setPedArmor
- setPedDoingGangDriveby
- setPedFightingStyle
- setPedHeadless
- setPedOnFire
- setPedStat
- setPedWalkingStyle
- setPedWeaponSlot
- warpPedIntoVehicle