CMehmed Posted March 1, 2013 Share Posted March 1, 2013 Hi all.I have a problem with my TDD map. The problem is, the map dont load if it has . It can load without It. And I have my other DD maps too.With . And they are working. How can I solve the problem ? please help, ty for all. Link to comment
Moderators IIYAMA Posted March 1, 2013 Moderators Share Posted March 1, 2013 This has nothing to do with mapping, but with scripting. https://wiki.multitheftauto.com/wiki/PlaySound playSound("music.mp3") -- require client .lua file. Link to comment
CMehmed Posted March 1, 2013 Author Share Posted March 1, 2013 I have client.lua , and its not working. I know its something with scripting , but what is the problem.I use the same meta.xml edited for my map.And client.lua and music.lua but not working. Link to comment
Moderators IIYAMA Posted March 1, 2013 Moderators Share Posted March 1, 2013 Post your meta + lua file. Link to comment
CMehmed Posted March 1, 2013 Author Share Posted March 1, 2013 Here is meta "hsm.mp3" /> Client .lua function ClientStarted () setWaterColor( 0 , 213, 255 ) setSkyGradient( 24, 100, 100, 255, 102, 0 ) end addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), ClientStarted ) Music.lua function startMusic() setRadioChannel(0) song = playSound("hsm.mp3",true) outputChatBox("[Music] Press z to stop / start music.",getRootElement(),255,255,255,true) end function makeRadioStayOff() setRadioChannel(0) cancelEvent() end function toggleSong() if not songOff then setSoundVolume(song,0) songOff = true removeEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) else setSoundVolume(song,1) songOff = false setRadioChannel(0) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) end end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),startMusic) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) addEventHandler("onClientPlayerVehicleEnter",getRootElement(),makeRadioStayOff) addCommandHandler("musicmusic",toggleSong) bindKey("z","down","musicmusic") addEventHandler("onClientResourceStop",getResourceRootElement(getThisResource()),startMusic) Link to comment
Moderators IIYAMA Posted March 1, 2013 Moderators Share Posted March 1, 2013 any errors? /debugscript 3 Did the script even started? outputChatBox("started!") -- outside of the functions. Link to comment
CMehmed Posted March 1, 2013 Author Share Posted March 1, 2013 I dont know where to see the errors. On localhost the map works.I saw that now. But on other server it doesnt. Idk how to explain. I did everything like in other maps. Link to comment
Moderators IIYAMA Posted March 1, 2013 Moderators Share Posted March 1, 2013 Well then there isn't anything wrong with the source...... Go to your server, login as admin, write /debugscript 3, start the map. and tell me why it doesn't start. If you can't tell me what went wrong, I can't help you. Link to comment
CMehmed Posted March 1, 2013 Author Share Posted March 1, 2013 I can't start map ,because it is not on the list.That's the problem. And as i said , when I dont have , it is on list and i can load. Link to comment
Moderators IIYAMA Posted March 1, 2013 Moderators Share Posted March 1, 2013 Make sure the file is also there. Link to comment
CMehmed Posted March 2, 2013 Author Share Posted March 2, 2013 I have all files there , but idk , that file src is the only problem. Link to comment
Moderators IIYAMA Posted March 2, 2013 Moderators Share Posted March 2, 2013 Well you care using, hsm.mp3 in the script. Since your "music.mp3" --> isn't there..... You are seriously confusing me!!! COME TO THE POINT! Link to comment
CMehmed Posted March 2, 2013 Author Share Posted March 2, 2013 Forget that hsm.mp3 , I edited it I use the music.mp3 . But still the same prob. Link to comment
Moderators IIYAMA Posted March 2, 2013 Moderators Share Posted March 2, 2013 Why don't you edit the music file name? Link to comment
CMehmed Posted March 2, 2013 Author Share Posted March 2, 2013 Why don't you edit the music file name? I did it 100 times. Link to comment
Moderators IIYAMA Posted March 2, 2013 Moderators Share Posted March 2, 2013 Well you still doing something wrong and you declare that nothing is wrong.... What do you expect me to do? Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now