Difference between revisions of "LUA:PlaySound"
(Created page with "= LUA Functions: PlaySound() = Has the given spawn play the given sound ==== Syntax ==== PlaySound(param1, param2, param3, param4, param5, [param6]) ==== Parameters ==== ; Re...") |
(No difference)
|
Latest revision as of 21:46, 11 September 2013
LUA Functions: PlaySound()
Has the given spawn play the given sound
Syntax
PlaySound(param1, param2, param3, param4, param5, [param6])
Parameters
- Required - param1 (Spawn), param2 (string), param3 (float), param4 (float), param5 (float)
- param1 is the spawn sending the sound
- param2 is the sound to play
- param3 is the x coordinate of the sound
- param4 is the y coordinate of the sound
- param5 is the z coordinate of the sound
- Optional - param6 (Spawn)
- param6 is a specific player to send the sound to
Usage
function hailed(NPC, Spawn)
PlaySound(NPC, "blah.mp3", GetX(NPC), GetY(NPC), GetZ(NPC))
end
When hailed the NPC will play the blah.mp3
Notes
If param6 is not given it will play the sound for all clients in the zone