Jump to content
  • 0

Sounds


Troold

Question

Posted

Now I have problem with music, when i run that script, there aren't any music ;/

That is my Code

function onResourceStart()
local sound = playSound3D("sounds/muzaa.mp3", 1479.2813720703, -1648.1474609375, 22.065521240234, true) 
end
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart)

Maybe i should do command to start that music D:

10 answers to this question

Recommended Posts

  • 0
Posted (edited)

Make sure you have marked this script as a client-side script. Also, make sure this is in your meta.xml:

Edited by Guest
  • 0
Posted
Make sure you have marked this script as a client-side script. Also, make sure this is in your meta.xml:

Fille?

Troold: it's file, not fille. I guess Gamesnert will edit it soon :)

  • 0
Posted

I just get my brains burned on some weird thing that

 tags don't seem to support XML syntax anymore... Rewrote it so many times I just dumped it right as it was but with 
instead. D:
  • 0
Posted
i mean do bindkey in script but how? :/

Replace addEventHandler with bindKey. :roll:

(Note, also replace the arguments, in case you thought it'd work with the same args :P )

  • 0
Posted

then that should look like that?

function onResourceStart()
local sound = playSound3D("muzaa/ravers.mp3", 1479.2813720703, -1648.1474609375, 22.065521240234, true)
end
bindKey (player, "i", "down", playSound3D)

sry but i never do any look like that binds ;fff

  • 0
Posted (edited)

calling playSound3D won't do anything, you need to call your onResourceStart function

in case you want the command to work you should also bind it for a person who exists for the code, since "player" doesn't

bindKey (getLocalPlayer(), "i", "down",onResourceStart)

Edited by Guest
  • 0
Posted

lol now in console i have ,,WARNING: muzaa.lua: Bad Argument @ 'bindKey' - Line: 4

ok i maked it work, i can hear music, but what i must to do to start music when I want no on script start :F (i mean bind on start music)

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