Jump to content

PlaySound3d Troubles


vanishSHC

Recommended Posts

Posted

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!

Posted (edited)

you want that sound on place , not x, y ,z ?

edit: change max distance and maybe should work

Edited by Guest

Multi Theft Auto 1.1

Rollerblades + Park = 90% completed

Skateboarding anims = 29% completed

Horse model + ride anim = 79% completed

Gods Of War gamemode = 67% completed

Multi Theft Auto 1.0.4

Gods Of War maps = 88% completed

WOW gamemode = 30% completed

Posted

remove lines 4-6 of your script, and replace line 3 of meta.xml with

  
<script src="customsfx.lua" type="client" /> 
  

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

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