M MY Multiplayer: Wiki
Side
Kind

getSoundSpeaker

Client

Returns the ped who speaks a sound.

ped|false getSoundSpeaker(sound sound)

Parameters

NameTypeDescription
soundsoundThe sound element, or a dui element for the browser's sound.

Returns

The ped or player, or false if nobody speaks the sound or the sound was not found.

Example

local speaker = getSoundSpeaker(line)
if speaker then
    setSoundSpeaker(line, false)
end
Coming from MTANot in MTA.

See also