Hello!
My problem is when i klick on the hardstyle button then i can hear the music but my friend cant hear it when im going close to him..
So any idea?
Client:
addEventHandler("onClientResourceStart", root,
function ()
mywindow = guiCreateWindow(681, 407, 378, 372, "Radio", false)
guiWindowSetSizable(mywindow, false)
hardstyleB = guiCreateButton(16, 31, 103, 43, "Hardstyle", false, mywindow )
closeB = guiCreateButton(144, 330, 94, 32, "Close", false, mywindow )
addEventHandler("onClientGUIClick", closeB, closewindow, false)
addEventHandler("onClientGUIClick", hardstyleB, theradio, false)
guiSetVisible(mywindow,false)
end)
function theradio ()
local x, y, z = getElementPosition(getLocalPlayer())
local int = getElementInterior(getLocalPlayer())
local dim = getElementDimension(getLocalPlayer())
local px, py, pz = getElementPosition(getLocalPlayer())
if (getDistanceBetweenPoints3D(x, y, z, px, py, pz)<50) then
local hardstylee = playSound3D("http://listen.hardstyle.nu/listen.pls", x, y, z)
setSoundMaxDistance(hardstylee, 40)
setElementDimension(hardstylee, dim)
setElementInterior(hardstylee, int)
attachElements ( hardstylee, localPlayer)
end
end