Jump to content

about PlaySound


SkatCh

Recommended Posts

guys i need some help i create a table and i want just those players will hear the sound ,

server :

for _, p in ipairs (CrTable) do 
                textDisplayRemoveObserver(Display, p) 
                triggerClientEvent("playMyMusic",p) 
                end 

and iside the client file i add the PlaySound . the text is working fine and the triggerClientEvent i think that there is something wrong.

i'm sorry about my english.

Link to comment
  • Other Languages Moderators
addEvent("playMyMusic",true) 
addEventHandler("playMyMusic", getRootElement(), 
function() 
outputChatBox("Test") 
local sound = playSound("music.wav",false) 
setSoundVolume(sound, 1.0) 
end) 

see if it output 'Test' in the chat.

Link to comment
  • Other Languages Moderators

How about this?

for _, p in ipairs (CrTable) do 
                outputChatBox("Test - Server", p) 
                textDisplayRemoveObserver(Display, p) 
                triggerClientEvent(p,"playMyMusic",p) 
                end 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...