Jump to content

تصحيح كود


Recommended Posts

السلام عليكم و رحمة الله و بركاتة

تصحيح للكود دا لانه جنني

 function soundStart()
   sound = playSound3D("sound.mp3", 720.30627, -456.85587, 16.92993, true) 
   sound = playSound3D("sound.mp3", 720.30627, -456.85587, 16.92993, true)
   sound = playSound3D("sound.mp3", 720.30627, -456.85587, 16.92993, true)
   sound = playSound3D("sound.mp3", 720.30627, -456.85587, 16.92993, true)
   setSoundMinDistance(sound, 40)
   setSoundMaxDistance(sound, 200)
   if sound then
        outputDebugString("3D Created successful", 3)
   else
        outputDebugString("Error creating 3D", 1)
   end
end
addEventHandler("onClientResourceStart", resourceRoot, soundStart)      

تشغيل صوت في مكان الي فيه يسمعه

Link to comment

خطأ انك تقوم بوضع اكثر من المنت وبنفس اسم المتغير

PosTable = {
	{720.30627, -456.85587, 16.92993},
	{721.30627, -456.85587, 16.92993},
	{719.30627, -456.85587, 16.92993}
}


function soundStart()
	for k , v in pairs ( PosTable ) do 
		local sound = playSound3D("sound.mp3", v[1],v[2],v[3], true)
		setSoundMaxDistance(sound, 200)
	end
end
addEventHandler("onClientResourceStart", resourceRoot, soundStart)     

واذا لم يعمل معك فالخطاء منك , قم بالتاكد من ملف الميتا او الملف الصوتي

 

Edited by !#NssoR_)
  • Like 2
Link to comment
  • 2 weeks later...

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