Hey guys !
I have a problem to play the sound !
Server side:
function newspm ( thePlayer, _, ... )
local message = table.concat ( { ... }, " " )
if ( isPlayerOnGroup ( thePlayer ) ) then
if ... then
for index, allpl in ipairs(getElementsByType("player")) do
outputChatBox ( "(News Reporter)".. getPlayerName ( thePlayer ) ..": #FFFFFF".. message, allpl,255, 255, 255, true )
end
else
outputChatBox ( "#FFFFFFSyntax: /news <text>", thePlayer, 255, 255, 255, true )
end
else
outputChatBox ( "#ff0000Access Denied!", thePlayer, 255, 255, 255, true )
end
end
addCommandHandler ( "news", newspm )
Client side:
function newssound()
local message = playSound("pm.mp3",true)
setSoundVolume(message, 0.9)
end
Like this send news for all players play sound !
please answer me !