Skip to content

Conversation

@FileEX
Copy link
Member

@FileEX FileEX commented Feb 20, 2025

This PR adds the pedSay function, which, when combined with setPedVoice, allows playing any voice lines. Without using setPedVoice, sounds can only be played for a specific ped model.

Syntax

nil pedSay(ped thePed, int soundId [, float probability = 1.0 ] )
  • The soundId argument specifies the line to be spoken by the ped. Most lines are assigned only to specific voices, for example, arrest-related lines are assigned to police skins, while a line like 'I got arrested' is assigned to CJ's voice. This is why setPedVoice is useful for this function.
  • The probability argument allows setting the likelihood from 0 to 100%. The same can be achieved in Lua, but since the function itself provides this option, I see no harm in using it.

Resolved #3759

tederis
tederis previously approved these changes Feb 22, 2025
@botder botder added the enhancement New feature or request label Feb 23, 2025
@botder botder merged commit 7067ac1 into multitheftauto:master Feb 23, 2025
6 checks passed
@botder botder added this to the 1.6.1 milestone Feb 23, 2025
MTABot pushed a commit that referenced this pull request Feb 23, 2025
7067ac1 Add new client function playPedVoiceLine (PR #4044)
@FileEX FileEX deleted the feature/pedsay branch February 23, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add function to play a ped speech setPedVoice

3 participants