Jump to content

[LOCK] What to do with the sounds


SpecT

Recommended Posts

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 by Guest
Link to comment

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

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
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
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...