SpecT Posted June 15, 2016 Share Posted June 15, 2016 (edited) Hey guys! Soo I'm working on race:dm server and I got a good idea how to optimize the download size. Anyway I made a script that will remove the node where is the music file (mp3 or ogg) in the meta. But even tho it's removed the song keeps starting on map start until I delete it from my PC. Then I got the idea that I would delete it in client side but then it's started so it can't be deleted. Also the fileDelete in client side works only for the current resource and not for the others. So what ideas do you have guys? I really need to finish this cuz the hosting people are making me problems. Thanks in advance!!! Edited June 15, 2016 by Guest Link to comment
#RooTs Posted June 15, 2016 Share Posted June 15, 2016 use music/sound in url EX: playSound and playSound3D function onResourceStart() local sound = playSound3D("sounds/song.mp3", 373.14, -125.21, 1001, true) -- add url local sound = playSound3D("http://YourSite.com/sounds/song.mp3", 373.14, -125.21, 1001, true) end addEventHandler("onClientResourceStart", resourceRoot, onResourceStart) function wasted (killer, weapon, bodypart) local sound = playSound("sounds/wasted.mp3") -- add url local sound = playSound("http://YourSite.com/sounds/wasted.mp3") setSoundVolume(sound, 0.5) -- set the sound volume to 50% end addEventHandler("onClientPlayerWasted", localPlayer, wasted) Link to comment
SpecT Posted June 15, 2016 Author Share Posted June 15, 2016 That won't help me at all. Nevermind .. you didn't get what I meant. Its for race gamemode not freeroam. And its hard to explain so I forced myself to fix it. I have much more experience than you think... I know that I can play sounds from url like a year ago when I started scripting and now you are telling me that. Also that has nothing to do with the topic question. Whatever I figured it out by myself. It's sad that there are good scripters here but most of the time they dont help with such complicated cases. Maybe they are busy right now ... Anyway thanks for the reply! Admins, lock the topic! Link to comment
#RooTs Posted June 15, 2016 Share Posted June 15, 2016 That won't help me at all.Nevermind .. you didn't get what I meant. Its for race gamemode not freeroam. And its hard to explain so I forced myself to fix it. I have much more experience than you think... I know that I can play sounds from url like a year ago when I started scripting and now you are telling me that. Also that has nothing to do with the topic question. Whatever I figured it out by myself. It's sad that there are good scripters here but most of the time they dont help with such complicated cases. Maybe they are busy right now ... Anyway thanks for the reply! Admins, lock the topic! need not block .. just wait others with more experience... sorry if my help it was no Link to comment
SpecT Posted June 15, 2016 Author Share Posted June 15, 2016 Man please read my whole reply! I said that I figured it out. I fixed it by myself even tho it took me long time to think of a way. IT'S SOLVED! Link to comment
Captain Cody Posted June 16, 2016 Share Posted June 16, 2016 When you post some such such as this, can you please explain in clearer English. Hard to under stand what exactly you are asking in the first place. Link to comment
Recommended Posts