Jump to content

تصحيح كود


Recommended Posts

سلام عليكم

ابي اسوي لما المود يشتغل الاغنية تشتغل

ولما اضغط زر معين الاغنية تقفل

لكن المشكلة هنا لما اضغط الزر الصوت يتكرر اكثر من مرة ما يقفل

محاولتي:

addEventHandler("onClientResourceStart",root)
addEventHandler( 'onClientGUIClick', root,
function()
	local sound2 = playSound("music.mp3") --Play wasted.mp3 from the sounds folder
	setSoundVolume(sound2, 0.5) -- set the sound volume to 50%
	if (source == Go) then
	    stopSound( sound2 )
end
end
)

 

Link to comment
8 minutes ago, Mr.Mostafa said:

سلام عليكم

ابي اسوي لما المود يشتغل الاغنية تشتغل

ولما اضغط زر معين الاغنية تقفل

لكن المشكلة هنا لما اضغط الزر الصوت يتكرر اكثر من مرة ما يقفل

محاولتي:


addEventHandler("onClientResourceStart",root)
addEventHandler( 'onClientGUIClick', root,
function()
	local sound2 = playSound("music.mp3") --Play wasted.mp3 from the sounds folder
	setSoundVolume(sound2, 0.5) -- set the sound volume to 50%
	if (source == Go) then
	    stopSound( sound2 )
end
end
)

 

addEventHandler("onClientResourceStart",root,
function()
	sound2 = playSound("music.mp3") --Play wasted.mp3 from the sounds folder
	setSoundVolume(sound2, 0.5) -- set the sound volume to 50%
end
)

addEventHandler( 'onClientGUIClick', root,
	function()
    	if (source == Go) then
	    stopSound( sound2 )
     	end
   end
)

كوداتك تخبييص

Link to comment
1 minute ago, +Source|> said:

addEventHandler("onClientResourceStart",root,
function()
	sound2 = playSound("music.mp3") --Play wasted.mp3 from the sounds folder
	setSoundVolume(sound2, 0.5) -- set the sound volume to 50%
end
)

addEventHandler( 'onClientGUIClick', root,
	function()
    	if (source == Go) then
	    stopSound( sound2 )
     	end
   end
)

كوداتك تخبييص

طيب كنت بسوي دي اصلا

بس sound2 

مب معرفة بالفنكشن التاني !!

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