Jump to content

playSound3d - تحقق من رابط الصوت


Recommended Posts

سلام عليكم

مافي طريقة اتحقق ان الرابط شغال او لالا

يعني ابي لو الرابط مرفوع عليه صوت تشتغل , غير كذا لا ..

 

addEventHandler("onClientGUIClick",root,
	function ()
        if source == GUIEditor.button[1] then
		  local link = guiGetText(GUIEditor.edit[1])
			sound = playSound3D(link, 1,2,3, true) 
				setSoundMaxDistance(sound, 25)
			setSoundVolume(sound, 20.0)
		end
	end
)

 

Link to comment
addEventHandler("onClientGUIClick",root,
	function ()
        if source == GUIEditor.button[1] then
		  local link = guiGetText(GUIEditor.edit[1])
			if ( link ) then
			sound = playSound3D(link, 1,2,3, true) 
				setSoundMaxDistance(sound, 25)
			setSoundVolume(sound, 20.0)
		end
	end
end
)

ما ادري بصراحة لي زمان ما برمجت شي او جربت شي خاص بالصوت

بس جرب

Link to comment
19 hours ago, #_iMr,[E]coo said:

Returns a sound element if the sound was successfully created, false otherwise.


if ( sound == false ) then return end

  

ما ظبطت

addCommandHandler("cs",
	function ()
		if sound == false then
			outputChatBox("لا يوجد صوت",255,0,0,true)
				else
			outputChatBox("يوجد صوت",255,0,0,true)
		end
	end
)

 

Link to comment
1 hour ago, Mr.Mostafa said:

ما ظبطت


addCommandHandler("cs",
	function ()
		if sound == false then
			outputChatBox("لا يوجد صوت",255,0,0,true)
				else
			outputChatBox("يوجد صوت",255,0,0,true)
		end
	end
)

 

    addEventHandler("onClientGUIClick",root,
    	function ()
            if source == GUIEditor.button[1] then -- button click start
    		  local link = guiGetText(GUIEditor.edit[1])
			  x, y, z = getElementPosition ( localPlayer )
    			sound = playSound3D(link, x, y, z+1) 
    				setSoundMaxDistance(sound, 25)
    			setSoundVolume(sound, 20.0)
				outputChatBox("يوجد صوت",255,0,0,true)
				elseif source == GUIEditor.button[2] then -- button click stop
					if ( sound == false ) then return end
				outputChatBox("لا يوجد صوت",255,0,0,true)
				destroyElement ( sound )
    		end
    	end
    )

 

Link to comment
1 hour ago, ميدوح said:

    addEventHandler("onClientGUIClick",root,
    	function ()
            if source == GUIEditor.button[1] then -- button click start
    		  local link = guiGetText(GUIEditor.edit[1])
			  x, y, z = getElementPosition ( localPlayer )
    			sound = playSound3D(link, x, y, z+1) 
    				setSoundMaxDistance(sound, 25)
    			setSoundVolume(sound, 20.0)
				outputChatBox("يوجد صوت",255,0,0,true)
				elseif source == GUIEditor.button[2] then -- button click stop
					if ( sound == false ) then return end
				outputChatBox("لا يوجد صوت",255,0,0,true)
				destroyElement ( sound )
    		end
    	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...