Jump to content

PlaySound3d Troubles


vanishSHC

Recommended Posts

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

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