Tokio

[HELP] What wrong with playSound3D?

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?

Share this post


Link to post
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?

Share this post


Link to post
12 minutes ago, TheMOG said:

trigger it, but i don't think that's gonna work with yt link.

how to trigger?

Share this post


Link to post

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 )

 

Share this post


Link to post

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.