AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Force to download specific file first (https://forums.alliedmods.net/showthread.php?t=340357)

sebxx4 11-13-2022 07:21

Force to download specific file first
 
Can I force the server to download a specific file to client first? I want to download mp3 file first to play it to the client while other files are downloaded.

fysiks 11-13-2022 13:41

Re: Force to download specific file first
 
Precache it like normal. You should be able to find information on this in the Scripting Help section as I'm quite sure it's been asked about before.

sebxx4 11-14-2022 01:53

Re: Force to download specific file first
 
Could you give me some hints how to find it? Maybe some dates of last post, or it's topic name?
You know, there are more than 2k pages to search...

fysiks 11-14-2022 22:59

Re: Force to download specific file first
 
A search for "precache mp3" in the Scripting Help section gave me only a few pages to look through and I found this which should help.

sebxx4 11-15-2022 01:29

Re: Force to download specific file first
 
Ok, buy do you even understood my question from 1st post?
I know how to precache mp3 files. The problem is when I have to precache more files (e.g some models, sprites, other sounds) and I want to force the client to download a specific mp3 file as first, play it to him and then download rest of the files. I'm trying to make music playing while downloading server files. I tested some plugins for it, but they all plays music after all files are already downloaded to the client (while connecting) so it doesnt make sense. I want it to play it when user has to wait for rest files to download.

DruGzOG 11-15-2022 07:59

Re: Force to download specific file first
 
Afaik, you cannot specify what gets downloaded first. Maybe if you combine it all into one plugin and precache that audio first, or maybe even plugin order, but other than that, not sure its possible in general with amxmodx

sebxx4 11-15-2022 09:52

Re: Force to download specific file first
 
Okay, but even if so, how the plugin will know the mp3 file has been already dowloaded?

fysiks 11-15-2022 23:32

Re: Force to download specific file first
 
Quote:

Originally Posted by sebxx4 (Post 2792859)
Okay, but even if so, how the plugin will know the mp3 file has been already dowloaded?

That's built into the game. If they already have it then they don't download it.

Trying to download and play the file in the same connection isn't really a thing that will happen all that often. Once they have it, they will then get to hear it on all subsequent connections. Personally, I hate servers that do this and I actually NULL out all of these sound files.

Natsheh 11-16-2022 06:13

Re: Force to download specific file first
 
I think this one would be easy to achieve if you listed the music name of the plugin at top of all plugins in the plugins.ini

Also if the sound file is precache via generic it will wait for sounds and models to be installed first then after both are finished it will sequel the generic as last.

Stefanos 11-16-2022 18:05

Re: Force to download specific file first
 
just dont listen to fysiks i know him for years and in all posts i saw or posted HE NEVER EVEN ONCE said something useful


All times are GMT -4. The time now is 07:42.

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