Jump to content

Help with script


=RM=Mario

Recommended Posts

Hi,ive been trying for many hours to get this to work,but failed.even tried to go on irc,well any ways im trying to make a script for Custom music to play at Grove Steet.and no there is no warinings or errors in debugscript,so please help

function onResourceStart()
local sound = playSound3D("xenon.mp3", 2484.0263671875, -1668.2800292969, 13.34375, true)
end
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart)

and here is meta file if theres any mistakes

</meta>
<info author="Mario" description="Music at Grove" version="1.0" type="map" />
   <script src="musicxeno.lua" type="client" />
   <file src="xenon.mp3" />
</meta>

Link to comment

Basically, you just debug your code. After you call playSound3D your local sound variable will hold a value/data of what playSound3D returned. If playSound3D failed the sound variable will hold false. So, to find out what that sound variable is you need to show that to yourself with outputDebugString or outputChatBox functions.

outputChatBox( tostring( sound ) ); -- you need to use tostring because playSound3D doesn't return string

Link to comment
i dont see anything in chatbox,and music isnt playing

- Are you sure you started the script?

- Are you sure your script is updated?

- Make sure you don't edit the resource in "resourcecache" folder.

- Is this folder or zip resource? If it's zip resource, make sure you don't have a folder with the same name.

Link to comment
i dont see anything in chatbox,and music isnt playing

- Are you sure you started the script?

- Are you sure your script is updated?

- Make sure you don't edit the resource in "resourcecache" folder.

- Is this folder or zip resource? If it's zip resource, make sure you don't have a folder with the same name.

yes i started script with admin Panel,yes i made sure i didnt edit resourcecache,and its a Folder

Link to comment

Your meta.xml:

<[color=#FF0000]/[/color]meta>
<info author="Mario" description="Music at Grove" version="1.0" type="map" />
   <script src="musicxeno.lua" type="client" />
   <file src="xenon.mp3" />
</meta>

I think this is right:

<meta>
<info author="Mario" description="Music at Grove" version="1.0" type="map" />
   <script src="musicxeno.lua" type="client" />
   <file src="xenon.mp3" />
</meta>

Link to comment
Your meta.xml:

<[color=#FF0000]/[/color]meta>
<info author="Mario" description="Music at Grove" version="1.0" type="map" />
   <script src="musicxeno.lua" type="client" />
   <file src="xenon.mp3" />
</meta>

I think this is right:

<meta>
<info author="Mario" description="Music at Grove" version="1.0" type="map" />
   <script src="musicxeno.lua" type="client" />
   <file src="xenon.mp3" />
</meta>

This is correct...

I'm going to stop helping people at 5am.

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