Jump to content

playsound3d احتاج كود بسيط في


Recommended Posts

السلام عليكم شباب 

حبيت اضيف أغنيه في ماب لاكن الماب في عالم 30 

لما اشغل الماب الأغنيه تشتغل في عالم0

احتاج مساعده و شكرا ^_^


function onResourceStart()
	local sound = playSound3D("song.mp3", 3445.1999511719, 436.89999389648, 3.0999999046326, true) 
end
addEventHandler("onClientResourceStart", resourceRoot, onResourceStart)

 

Link to comment
12 hours ago, #\_oskar_/# said:

setElementDimension (sound, 30 )

 

سويت كذا ما نجحت

function startMySound()
    sound = playSound( "sound.mp3", true )
	setElementDimension (sound, 30 )
end
addEventHandler( "onClientResourceStart", resourceRoot, startMySound )

function stopMySound()
    stopSound( sound )
end
addCommandHandler ( "sound", stopMySound ) --using the command 'stopsound' will stop the sound

 

Link to comment
function onResourceStart()
	local sound = playSound3D("song.mp3", 3445.1999511719, 436.89999389648, 3.0999999046326, true) 
  	setElementDimension(sound,30)
end
addEventHandler("onClientResourceStart", resourceRoot, onResourceStart)

--wiki : Remember to use setElementDimension after creating the sound to play it outside of dimension 0.

^ كودك الي فوق اظن انه يشتغل لـ عالم رقم 0 بس .

 

Link to comment
11 minutes ago, RRex said:

function onResourceStart()
	local sound = playSound3D("song.mp3", 3445.1999511719, 436.89999389648, 3.0999999046326, true) 
  	setElementDimension(sound,30)
end
addEventHandler("onClientResourceStart", resourceRoot, onResourceStart)

--wiki : Remember to use setElementDimension after creating the sound to play it outside of dimension 0.

^ كودك الي فوق اظن انه يشتغل لـ عالم رقم 0 بس .

 

يب بس كيف اخلي يستمع من بعيد شوي لأن دا يستمع من قريب فقط

Link to comment
4 minutes ago, #Doctor said:

يب بس كيف اخلي يستمع من بعيد شوي لأن دا يستمع من قريب فقط

function onResourceStart()
	local sound = playSound3D("song.mp3", 3445.1999511719, 436.89999389648, 3.0999999046326, true) 
  	setElementDimension(sound,30)
  	setSoundMaxDistance(sound, 20)
end
addEventHandler("onClientResourceStart", resourceRoot, onResourceStart)

 

Edited by RRex
Link to comment
22 minutes ago, RRex said:

function onResourceStart()
	local sound = playSound3D("song.mp3", 3445.1999511719, 436.89999389648, 3.0999999046326, true) 
  	setElementDimension(sound,30)
  	setSoundMaxDistance(sound, 20)
end
addEventHandler("onClientResourceStart", resourceRoot, onResourceStart)

 

مشكوور حبيبي ما قصرت شغاله ميه ميه 

اقدر اضيفلها امر لي يبي يوقف الأغنيه من الف8 ؟؟

 

Link to comment
14 minutes ago, #Doctor said:

مشكوور حبيبي ما قصرت شغاله ميه ميه 

اقدر اضيفلها امر لي يبي يوقف الأغنيه من الف8 ؟؟

 

function onResourceStart()
	sound = playSound3D("song.mp3", 3445.1999511719, 436.89999389648, 3.0999999046326, true) 
  	setElementDimension(sound,30)
  	setSoundMaxDistance(sound, 20)
end
addEventHandler("onClientResourceStart", resourceRoot, onResourceStart)
-- By oskar
addCommandHandler("stop", function ()
    if isElement(sound) then
        destroyElement(sound)
    end
end)

 

Edited by RRex
إضافة كود أوسكار .
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...