Jump to content

[HELP] What wrong with playSound3D?


Tokio

Recommended Posts

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
6 minutes ago, TheMOG said:
  1. 
    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

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

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...