PlayPedVoiceLine: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Client function}} {{New feature/item|3.0161|1.6.0|22997|This function allows playing specific voice lines of a ped.}} {{Note|Voice lines are assigned to a specific skin ID, so using setPedVoice might be helpful if you want to play any voice lines regardless of the skin.}} ==Syntax== <syntaxhighlight lang="lua"> nil playPedVoiceLine( ped thePed, number lineId [, float probability = 1.0 ] ) </syntaxhighlight> {{OOP||element:playPedVoiceLine||}}...") |
|||
Line 13: | Line 13: | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''thePed:''' The [[ped]] who will speak the lines. | *'''thePed:''' The [[ped]] who will speak the lines. | ||
*'''lineId:''' The ID of the line to be spoken (0-359). | *'''lineId:''' The ID of the line to be spoken (0-359). See [https://github.com/gta-reversed/gta-reversed/blob/de0b162385a92e5545058671a787ea43423cfc4d/source/game_sa/Audio/Enums/PedSpeechContexts.h ID List] | ||
===Optional Arguments=== | ===Optional Arguments=== |
Latest revision as of 18:12, 2 March 2025
Syntax
nil playPedVoiceLine( ped thePed, number lineId [, float probability = 1.0 ] )
OOP Syntax Help! I don't understand this!
- Method: element:playPedVoiceLine(...)
Required Arguments
- thePed: The ped who will speak the lines.
- lineId: The ID of the line to be spoken (0-359). See ID List
Optional Arguments
NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.
- probability: The probability that the line will be spoken (0 - 1), where 1 means 100%.
Returns
The function returns nothing, always nil.
Examples
![]() |
Script Example Missing Function PlayPedVoiceLine needs a script example, help out by writing one. |
Before submitting check out Editing Guidelines Script Examples. |
See Also
- canPedBeKnockedOffBike
- getPedAnalogControlState
- getPedAnimation
- getPedBonePosition
- getPedCameraRotation
- getPedControlState
- getPedMoveState
- getPedOxygenLevel
- getPedSimplestTask
- getPedTargetCollision
- getPedTargetEnd
- getPedTargetStart
- getPedTask
- getPedVoice
- getPedWeaponMuzzlePosition
- givePedWeapon
- isPedBleeding
- isPedDoingTask
- 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
- isPedReloadingWeapon
- isPedWearingJetpack
- killPed
- removePedFromVehicle
- setPedAnimation
- setPedAnimationProgress
- setPedAnimationSpeed
- setPedArmor
- setPedDoingGangDriveby
- setPedFightingStyle
- setPedHeadless
- setPedOnFire
- setPedStat
- setPedWalkingStyle
- setPedWeaponSlot
- warpPedIntoVehicle