Tokio Posted June 3, 2018 Share Posted June 3, 2018 client: function rtwjhrt() if isElement(ss) then stopSound(ss) return end local car = getPedOccupiedVehicle ( localPlayer ) local gettext = guiGetText ( GUIEditor.edit[1] ) local x, y, z = getElementPosition( car ) local ss = playSound3D( 'asd.mp3', x, y, z ) setSoundMaxDistance( ss, 85 ) attachElements(ss,car) end addEvent("asd123asd456",true) addEventHandler("asd123asd456",root,rtwjhrt) server: function trig() triggerClientEvent(root,"asd123asd456",root) end addEvent( "asjdlaj", true ) addEventHandler( "asjdlaj", root, trig ) Why not hear the sound another players? Link to comment
itHyperoX Posted June 3, 2018 Share Posted June 3, 2018 function trig() triggerClientEvent(root, "asd123asd456", root, "asd.mp3") end addEvent( "asjdlaj", true ) addEventHandler( "asjdlaj", root, trig ) Link to comment
Tokio Posted June 3, 2018 Author Share Posted June 3, 2018 6 minutes ago, TheMOG said: function trig() triggerClientEvent(root, "asd123asd456", root, "asd.mp3") end addEvent( "asjdlaj", true ) addEventHandler( "asjdlaj", root, trig ) i changed the asd.mp3 to converterlink/ytlink, but i get ytlink with guiGetText. how to add this to server side? Link to comment
itHyperoX Posted June 3, 2018 Share Posted June 3, 2018 trigger it, but i don't think that's gonna work with yt link. Link to comment
Tokio Posted June 3, 2018 Author Share Posted June 3, 2018 12 minutes ago, TheMOG said: trigger it, but i don't think that's gonna work with yt link. how to trigger? Link to comment
Tokio Posted June 3, 2018 Author Share Posted June 3, 2018 this can work? function trig() for _, player in pairs( getElementsByType 'player' ) do triggerClientEvent(player,"asd123asd456",player) end end addEvent( "asjdlaj", true ) addEventHandler( "asjdlaj", root, trig ) Link to comment
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