GamerDeMTA Posted March 17, 2013 Posted March 17, 2013 I need to put a sound when a player die, can someone help me?
GamerDeMTA Posted March 17, 2013 Author Posted March 17, 2013 This will work? SERVER addEventHandler("onClientPlayerWasted", root, triggerClientEvent ("Client",root) end end) CLIENT function ClientSide() playSound ("no.mp3") end addEvent("Client",true, ClientSide ) addEventHandler("Client",root, ClientSide )
iPrestege Posted March 17, 2013 Posted March 17, 2013 This will work?SERVER addEventHandler("onClientPlayerWasted", root, triggerClientEvent ("Client",root) end end) CLIENT function ClientSide() playSound ("no.mp3") end addEvent("Client",true, ClientSide ) addEventHandler("Client",root, ClientSide ) No, you want only the player can listen to the sound or all players? when the player die?
csiguusz Posted March 17, 2013 Posted March 17, 2013 Your server-side is wrong, but it should work: addEventHandler("onPlayerWasted", root, function () triggerClientEvent ("Client",root) end)
iPrestege Posted March 17, 2013 Posted March 17, 2013 addEventHandler("onClientPlayerWasted",localPlayer, function ( ) playSound("no.mp3",true) end )
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now