vanishSHC Posted November 20, 2010 Share Posted November 20, 2010 Okay, So I'd like to think im on the right track as far as making this sound work. I have a DJ booth set up outside of my bar with animated ped's around it dancing n smokin n drinkin... The one I am doing is currently located in LS at the beach. However, I cannot hear anything when i go to the given coordinates from any distance. It looks silly watching them dance to nothing. I am getting No debug Errors either from this resource. Should I attach it to the DJ booth? Or is it possible to do it how i am currently attempting? Meta Code: <meta> <info author="n0ps~>sHc" type="play2" name="sHc Auto" description="booth music" /> <script src="customsfx.lua" /> <file src="sounds/dub.mp3" /> </meta> Lua Code: function onResourceStart() local sound = playSound3D("sounds/dub.mp3", 584.48, -1884.20, 3.92, true) setSoundMinDistance ( sound, 0 ) setSoundMaxDistance ( sound, 15 ) setSoundVolume(sound, 1) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart) Im thinking its something to do with the event handler. Anyway Help would be appreciated! Link to comment
drake989 Posted November 20, 2010 Share Posted November 20, 2010 (edited) you want that sound on place , not x, y ,z ? edit: change max distance and maybe should work Edited November 20, 2010 by Guest Link to comment
dzek (varez) Posted November 20, 2010 Share Posted November 20, 2010 remove lines 4-6 of your script, and replace line 3 of meta.xml with <script src="customsfx.lua" type="client" /> Link to comment
vanishSHC Posted November 20, 2010 Author Share Posted November 20, 2010 Thank you That worked perfectly! Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now