Raised This Month: $ Target: $400
 0% 

[L4D2] Server-side custom music?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CaptainKuijt
New Member
Join Date: Sep 2016
Location: Norway
Old 10-03-2016 , 22:57   [L4D2] Server-side custom music?
Reply With Quote #1

Specifically I was wondering about elevator music, such as in No Mercy chapter 4 (but also tank music, concert music, etc).
I found a plugin that allows the server to play music in the elevator, but the problem is that it has to be a sound file that all the clients have.
Otherwise only person that has the soundfile will hear it.

Is there a way to make this 100% server-side and not client-side? If so, how do I do it?

Last edited by CaptainKuijt; 10-03-2016 at 22:57.
CaptainKuijt is offline
Send a message via AIM to CaptainKuijt Send a message via MSN to CaptainKuijt
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 10-09-2016 , 09:12   Re: [L4D2] Server-side custom music?
Reply With Quote #2

Quote:
Originally Posted by CaptainKuijt View Post
Specifically I was wondering about elevator music, such as in No Mercy chapter 4 (but also tank music, concert music, etc).
I found a plugin that allows the server to play music in the elevator, but the problem is that it has to be a sound file that all the clients have.
Otherwise only person that has the soundfile will hear it.

Is there a way to make this 100% server-side and not client-side? If so, how do I do it?
I think the plugin already does that. If you want the clients to have it in a fast way instead of just making them download the files themselves, modify the line:
PHP Code:
for (new 0g_iTracksi++)
{
    
PrecacheSound(g_sTracks[i], true);

to:
PHP Code:
for (new 0g_iTracksi++)
{
    if (!
FileExists(g_sTracks[i]))
    {
        
AddFileToDownloadsTable(g_sTracks[i]);
    }
    else
    {
        
PrecacheSound(g_sTracks[i], true);
    }

That way, clients just have to download the files directly from the server.

Last edited by cravenge; 10-09-2016 at 09:12.
cravenge is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode