Hey! I want some ambient sound on my zombie server. I made the sound cutting, so every ambient is in other .mp4 file
Here is the code.
local sounds = {" sounds/ambient0.mp4, sounds/ambient1.mp4, sounds/ambient2.mp4, sounds/ambient3.mp4, sounds/ambient4.mp4, sounds/ambient5.mp4, sounds/ambient6.mp4, sounds/ambient7.mp4, sounds/ambient8.mp4, sounds/ambient9.mp4, sounds/ambient10.mp4, sounds/ambient11.mp4, sounds/ambient12.mp4, sounds/ambient13.mp4, sounds/ambient14.mp4, sounds/ambient15.mp4, sounds/ambient16.mp4, sounds/ambient17.mp4, sounds/ambient18.mp4, sounds/ambient19.mp4, sounds/ambient20.mp4, sounds/ambient21.mp4, sounds/ambient22.mp4, sounds/ambient23.mp4, sounds/ambient24.mp4, sounds/ambient25.mp4, sounds/ambient26.mp4, sounds/ambient27.mp4, sounds/ambient28.mp4, sounds/ambient29.mp4, sounds/ambient30.mp4, sounds/ambient31.mp4, sounds/ambient32.mp4, sounds/ambient33.mp4, sounds/ambient34.mp4 "} function playsound() playSound(sounds[math.random(1, #sounds)]) setSoundVolume(sound, 300.0) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),playsound) setTimer(playsound, 60000,0)
Here is the XML:
<meta> <info author="Yakuza" type="script" description="Ambient Sounds" version="1.0.1"/> <script src="ambience.lua" type="client" /> <file src="sounds/ambient0.mp4" /> <file src="sounds/ambient1.mp4" /> <file src="sounds/ambient2.mp4" /> <file src="sounds/ambient3.mp4" /> <file src="sounds/ambient4.mp4" /> <file src="sounds/ambient5.mp4" /> <file src="sounds/ambient6.mp4" /> <file src="sounds/ambient7.mp4" /> <file src="sounds/ambient8.mp4" /> <file src="sounds/ambient9.mp4" /> <file src="sounds/ambient10.mp4" /> <file src="sounds/ambient11.mp4" /> <file src="sounds/ambient12.mp4" /> <file src="sounds/ambient13.mp4" /> <file src="sounds/ambient14.mp4" /> <file src="sounds/ambient15.mp4" /> <file src="sounds/ambient16.mp4" /> <file src="sounds/ambient17.mp4" /> <file src="sounds/ambient18.mp4" /> <file src="sounds/ambient19.mp4" /> <file src="sounds/ambient20.mp4" /> <file src="sounds/ambient21.mp4" /> <file src="sounds/ambient22.mp4" /> <file src="sounds/ambient23.mp4" /> <file src="sounds/ambient24.mp4" /> <file src="sounds/ambient25.mp4" /> <file src="sounds/ambient26.mp4" /> <file src="sounds/ambient27.mp4" /> <file src="sounds/ambient28.mp4" /> <file src="sounds/ambient29.mp4" /> <file src="sounds/ambient30.mp4" /> <file src="sounds/ambient31.mp4" /> <file src="sounds/ambient32.mp4" /> <file src="sounds/ambient33.mp4" /> <file src="sounds/ambient34.mp4" /> </meta>
And here is the error message I get when I start the resource:
BASS ERROR 2 in LoadMedia path:C:Program Files (x86)MTA San Andreas 1.3modsdeathmatchresourcesambient soundsambient0.mp4, soundsambient1.mp4, soundsambient2.mp4, soundsambient3.mp4, soundsambient4.mp4, soundsambient5.mp4, soundsambient6.mp4, soundsambient7.mp4, soundsambient8.mp4, soundsambient9.mp4, soundsambient10.mp4, soundsambient11.mp4, soundsambient12.mp4, soundsambient13.mp4, soundsambient14.mp4, soundsambient15.mp4, soundsambient16.mp4, soundsambient17.mp4, soundsambient18.mp4, soundsambient19.mp4, soundsambient20.mp4, soundsambient21.mp4, soundsambient22.mp4, soundsambient23.mp4, soundsambient24.mp4, soundsambient25.mp4, soundsambient26.mp4, soundsambient27.mp4, soundsambient28.mp4, soundsambient29.mp4, soundsambient30.mp4, soundsambient31.mp4, soundsambient32.mp4, soundsambient33.mp4, soundsambient34.mp4 3d:0 loop:0
Question
-
- Share
I keep getting errors in my server when I open console.
BASS ERROR 2 in LoadMedia path:C:GamesMTAmodsdeathmatchresourceszombierpgsoundsmgroan5.ogg 3d:1 loop:0
BASS ERROR 2 in LoadMedia path:C:GamesMTAmodsdeathmatchresourceszombierpgsoundsmgroan5.ogg 3d:1 loop:0
BASS ERROR 2 in LoadMedia path:C:GamesMTAmodsdeathmatchresourceszombierpgsoundsmgroan7.ogg 3d:1 loop:0
BASS ERROR 2 in LoadMedia path:C:GamesMTAmodsdeathmatchresourceszombierpgsoundsmgroan5.ogg 3d:1 loop:0
etc…
Edited August 23, 2012 by Guest
Link to comment
Recommended Posts
- 0
-
- Share
Those are your Sound errors,
Go to the script that involves those sounds then make sure your file path is as corrected: Filepath
Link to comment
- 0
- Author
-
- Share
I replaced it with all with: zombierpg/sounds/mrgoan1 etc
But now it says that it can’t find this location…
Link to comment
- 0
-
- Share
Put how it was and show meta.xml
Link to comment
- 0
-
- Share
Actually, your going to have to post the sound part of the script here and your Meta.xml.
Link to comment
- 0
- Author
-
- Share
I replaced my sounds back to normal but I still get these errors:
Script part:
addEvent( "Zomb_Moan", true ) function Zmoan ( ped, randnum ) if (isElement(ped)) then local Zx,Zy,Zz = getElementPosition( ped ) local sound = playSound3D("sounds/mgroan"..randnum..".ogg", Zx, Zy, Zz, false) setSoundMaxDistance(sound, 20) end end addEventHandler( "Zomb_Moan", getRootElement(), Zmoan )
Meta part:
<file src="sounds/mgroan2.ogg" /> <file src="sounds/mgroan3.ogg" /> <file src="sounds/mgroan4.ogg" /> <file src="sounds/mgroan6.ogg" /> <file src="sounds/mgroan8.ogg" /> <file src="sounds/mgroan9.ogg" /> <file src="sounds/mgroan10.ogg" />
Link to comment
- 0
-
- Share
well, that looks good, can you play the sounds your self?
BTW, try this:
addEvent( "Zomb_Moan", true ) function Zmoan ( ped, randnum ) if (isElement(ped)) then local Zx,Zy,Zz = getElementPosition( ped ) local sound = playSound3D("sounds/mgroan"..randnum..".ogg", Zx, Zy, Zz) setSoundMaxDistance(sound, 20) end end addEventHandler( "Zomb_Moan", getRootElement(), Zmoan )
Link to comment
- 0
- Author
-
- Share
I keep getting errors, everything else looks same. And yes I can hear the sounds.
Link to comment
- 0
-
- Share
try keeping the sounds in the same folder as the scripts, meaning don’t put them in the sounds folder.
Link to comment
- 0
- Author
-
- Share
Bass error is still here…
Link to comment
- 0
-
- Share
Are you sure the files are OGG format? Didn’t you edit the extension?
Link to comment
- 0
- Author
-
- Share
Link to comment
- 0
- Author
-
- Share
Link to comment
- 0
-
- Share
Do you have Team Viewer?
and try putting the folder name as: ‘[sounds]’ .
Link to comment
- 0
- Scripting Moderators
- Scripting Moderators
-
- Share
addEvent( "Zomb_Moan", true ) function Zmoan ( ped, randnum ) if (isElement(ped)) then local Zx,Zy,Zz = getElementPosition( ped ) if ( randnum == 5 or randnum == 7 ) then return end local sound = playSound3D("sounds/mgroan"..randnum..".ogg", Zx, Zy, Zz, false) setSoundMaxDistance(sound, 20) end end addEventHandler( "Zomb_Moan", getRootElement(), Zmoan )
Link to comment
- 0
-
- Share
addEvent( "Zomb_Moan", true ) function Zmoan ( ped, randnum ) if (isElement(ped)) then local Zx,Zy,Zz = getElementPosition( ped ) if ( randnum == 5 or randnum == 7 ) then return end local sound = playSound3D("sounds/mgroan"..randnum..".ogg", Zx, Zy, Zz, false) setSoundMaxDistance(sound, 20) end end addEventHandler( "Zomb_Moan", getRootElement(), Zmoan )
This won’t fix the error, it will just stop the function if randnum is 5 or 7.
Link to comment
- 0
- Author
-
- Share
Nothing helped, does anyone else has any idea?
Link to comment
Create an account or sign in to comment
You need to be a member in order to leave a comment
Sign in
Already have an account? Sign in here.
Sign In Now
Describe the bug
[Output] : BASS ERROR 41 in LoadMedia path:C:GamesMTA San Andreasmodsdeathmatchresourcesex_gatesfilesgate.mp3 3d:1 loop:0
Game freezes for 1-5 seconds
Steps to reproduce
Use mp3 at playSound or playSound3D
Version
Multi Theft Auto v1.5.9-release-21150
Additional context
This bug is from 21135
After converting to .wav it will work without any errors.
Script + mp3 file:
gate.zip
addEvent(«playGateSound», true)
addEventHandler(«playGateSound», root, function(sound,x,y,z)
local mx, my, mz = getElementPosition(localPlayer)
if getDistanceBetweenPoints3D(x, y, z, mx, my, mz) <= 50 then
local sound = playSound3D(sound, x,y,z, false)
setSoundVolume(sound, 0.3)
setSoundMinDistance(sound, 10)
setSoundMaxDistance(sound, 15)
end
end)
Relevant log output
[2022-04-08 12:16:09] [Output] : BASS ERROR 41 in LoadMedia path:C:GamesMTA San Andreasmodsdeathmatchresourcesex_gatesfilesgate.mp3 3d:1 loop:0 [2022-04-08 12:16:42] [Output] : BASS ERROR 41 in LoadMedia path:C:GamesMTA San Andreasmodsdeathmatchresourcesex_gatesfilesgate.mp3 3d:1 loop:0 [2022-04-08 12:16:44] [Output] : BASS ERROR 41 in LoadMedia path:C:GamesMTA San Andreasmodsdeathmatchresourcesex_gatesfilesgate.mp3 3d:1 loop:0
Security Policy
- I have read and understood the Security Policy and this issue is not security related.
-
BASS ERROR 2 in LoadMedia path:C:Program Files (x86)MTA San Andreas 1.5modsdeathmatchresourcespd_business_clublecimy 3d:1 loop:0
-
[info] Zakładasz maskę. Od teraz nazwa twojej postaci jest ukryta.
-
[?] Nieznajomy #22446: atnie slysze
-
[?] Nieznajomy #22446: kurwa
-
[?] Nieznajomy #22446: nie lsysze
-
Odczekaj chwilę…
-
[?] Nieznajomy #22446: pisz kurwa
-
[info] Zostałeś zakuty przez Kubasny!
-
[info] Zdejmujesz maskę.
-
[86] davek: no co ty odpierdalasz koles
-
[86] davek: mam wylaczonego voica
-
[86] davek: i pierdolisz cos
-
Nieznajomy #2759 rzuca sie na uciekajacego, wykreca mu lapy po czym zakuwa w kajdanki.
-
[86] davek: nom
-
[86] davek: i co ty odpierdalasz?
-
Nieznajomy #2759 przystawil zatrzymanego do maski, po czym dokladnie go przeszukuje.
-
Chcesz wybrać ID grupy do której chcesz pisać? Wpisz /gchat <id grupy>!
-
[DC] [District Shooter | davek] [86] davek: hahaha
-
[DC] [District Shooter | davek] [86] davek: kurwa
-
[DC] [District Shooter | davek] [86] davek: sapd
-
[DC] [District Shooter | davek] [86] davek: podjechalo
-
[DC] [District Shooter | davek] [86] davek: i jeblo mi z parki
-
[86] davek: no
-
[86] davek: i co to ma byc?
-
[86] davek: podjezdzasz
-
[86] davek: pisze nie slysze
-
[86] davek: i napierdalasz
-
[86] davek: no pomysl
-
[?] Nieznajomy #2759: Jestes zatrzymany pod pretekstem posiadania broni.
-
[86] davek: nom
-
[86] davek: ktorej nie mam
-
[86] davek: jebnij sie w glowe
-
[86] davek: bo odpierddalasz takie rp
-
[86] davek: podbiegasz
-
[86] davek: sprawdzasz eq
-
[?] Nieznajomy #14123: u
-
Odczekaj chwilę…
-
[?] Nieznajomy #2759: Jeszcze sprawdzimy, czy jestes poszukikwany.
-
[?] Nieznajomy #14123: płacz
-
[86] davek: pretekst
-
[86] davek: nom
-
[86] davek: ja i tak wychodze
-
[?] Nieznajomy #14123: oj
-
Odczekaj chwilę…
-
[86] davek: zaraz
-
[86] davek: wiec siema
-
[?] Nieznajomy #14123: wiec ban
-
[?] Nieznajomy #14123: siema
-
Nieznajomy #2759 wyjal od davek’a dokumenty, podal funkcjonariuszom.
-
[86] davek: wyjal
-
[86] davek: a skad?
-
[86] davek: ktorych nie mam
-
Odczekaj chwilę…
-
[86] davek: ahahahah
-
[?] Nieznajomy #2759: Dokladnie Cie przeszukalem
-
[86] davek: ta
-
[86] davek: na chuju to napisales?
-
[?] Nieznajomy #2759: Dobra nie placz.
-
Przez drobne problemy techniczne start filmu się chwilkę opóźnił, osoby których jeszcze nie m << kacper5091
-
[?] Nieznajomy #2759: gangi must winy
-
[?] Nieznajomy #2759: mood
-
[86] davek: chyba powinienem na do napisac
-
[86] davek: co znalazles?
-
nie ma zapraszamy!!! Film już trwa << kacper5091
-
- #1
BASS ERROR 2 in LoadMedia path:C:Program Files (x86)MTA San Andreas 1.4modsdeathmatchresourcesRLsoundsstart.mp3 3d:0 loop:1
function achievsound_func ()
local sound = playSound («sounds/start.mp3», false)
setSoundVolume ( sound, 10 )
endKann mir wer weiterhelfen?
-
- #2
Was genau geht den nicht? Spielt er die Musik nicht ab oder wie?
-
- #3
Jap es kommt keine musik und es kommt immer die Error meldung
-
- #4
War das Script schon drinnen oder hast du es gemacht?
-
- #5
du musst auch nen EventHandler hinzufügen, damit diese Funktion auch gestartet wird^^
-
- #6
function GUI_ShowLoginWindow()
guiSetVisible(LoginWindow, true)
guiSetVisible(LoginWindow2, true)
guiSetVisible(LoginWindow3, true)
showCursor(true)
loginsound = playSound(«start.mp3», true)
setSoundVolume(loginsound, 10)
bindKey ( «enter», «down», SubmitEinloggenBtn )
end
addEvent ( «ShowLoginWindow», true)
addEventHandler ( «ShowLoginWindow», getRootElement(), GUI_ShowLoginWindow)function GUI_DisableLoginWindow()
guiSetVisible(LoginWindow, false)
guiSetVisible(LoginWindow2, false)
guiSetVisible(LoginWindow3, false)
showCursor(false)
stopSound(loginsound)
setTimer ( checkForSocialStateChanges, 10000, -1 )
setTimer ( getPlayerSocialAvailableStates, 1000, 1 )
end
addEvent ( «DisableLoginWindow», true )
addEventHandler ( «DisableLoginWindow», getRootElement(), GUI_DisableLoginWindow)addEventHandler(«onClientResourceStart», getResourceRootElement(getThisResource()),
function ()local player = getLocalPlayer()
loginScreen = _CreateLoginWindow()
for i = 1, 100 do
outputChatBox (» «)
end
setTimer ( ShowInfoWindow, 1000, 1 )
triggerServerEvent ( «regcheck», getLocalPlayer(), player )
end )ist doch eig richtig
-
- #7
Überprüf mal ob das bei dir Überall drinnen ist?
addEventHandler ("onClientResourceStart", resourceRoot, function ()joinmusik = playSound ("register_login/start.mp3", true) -- hier music.mp3 zu dem Filepath deiner Datei umändern! end) function stopJoinMusik () stopSound (joinmusik) end
in in der /register_login/register_window.lua ein (ganz am Ende) dann ersetzt du diese Funktion in der register_window.lua Zeile 228:
function GUI_DisableRegisterGui() cancelCameraIntro () destroyElement ( gWindow["register"] ) showCursor ( false ) removeEventHandler ( "onClientRender", getRootElement(), showVersionInfo ) destroyElement ( gImage["versionInfoDraw1"] ) destroyElement ( gImage["versionInfoDraw2"] ) killTimer ( LVCamFlightTimer ) end
durch:
function GUI_DisableRegisterGui() stopJoinMusik () cancelCameraIntro () destroyElement ( gWindow["register"] ) showCursor ( false ) removeEventHandler ( "onClientRender", getRootElement(), showVersionInfo ) destroyElement ( gImage["versionInfoDraw1"] ) destroyElement ( gImage["versionInfoDraw2"] ) killTimer ( LVCamFlightTimer ) end
und in der login_window.lua Zeile 112
function GUI_DisableLoginWindow() cancelCameraIntro () guiSetVisible(LoginWindow, false) showCursor(false) removeEventHandler ( "onClientRender", getRootElement(), showVersionInfo ) destroyElement ( gImage["versionInfoDraw1"] ) destroyElement ( gImage["versionInfoDraw2"] ) setTimer ( checkForSocialStateChanges, 10000, -1 ) setTimer ( getPlayerSocialAvailableStates, 1000, 1 ) if isTimer ( LVCamFlightTimer ) then killTimer ( LVCamFlightTimer ) end end
Alles anzeigen
durch:
function GUI_DisableLoginWindow() stopJoinMusik () cancelCameraIntro () guiSetVisible(LoginWindow, false) showCursor(false) removeEventHandler ( "onClientRender", getRootElement(), showVersionInfo ) destroyElement ( gImage["versionInfoDraw1"] ) destroyElement ( gImage["versionInfoDraw2"] ) setTimer ( checkForSocialStateChanges, 10000, -1 ) setTimer ( getPlayerSocialAvailableStates, 1000, 1 ) if isTimer ( LVCamFlightTimer ) then killTimer ( LVCamFlightTimer ) end end
Alles anzeigen
-
- #8
Ist die start.mp3 im sounds Ordner?
Bitte die Clientdaten überprüfen