Raised This Month: $51 Target: $400
 12% 

Force to download specific file first


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sebxx4
Senior Member
Join Date: Feb 2013
Old 11-13-2022 , 07:21   Force to download specific file first
Reply With Quote #1

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.
sebxx4 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-13-2022 , 13:41   Re: Force to download specific file first
Reply With Quote #2

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.
__________________
fysiks is offline
sebxx4
Senior Member
Join Date: Feb 2013
Old 11-14-2022 , 01:53   Re: Force to download specific file first
Reply With Quote #3

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...

Last edited by sebxx4; 11-14-2022 at 02:00.
sebxx4 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-14-2022 , 22:59   Re: Force to download specific file first
Reply With Quote #4

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.
__________________
fysiks is offline
sebxx4
Senior Member
Join Date: Feb 2013
Old 11-15-2022 , 01:29   Re: Force to download specific file first
Reply With Quote #5

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.

Last edited by sebxx4; 11-15-2022 at 01:30.
sebxx4 is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 11-15-2022 , 07:59   Re: Force to download specific file first
Reply With Quote #6

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
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
sebxx4
Senior Member
Join Date: Feb 2013
Old 11-15-2022 , 09:52   Re: Force to download specific file first
Reply With Quote #7

Okay, but even if so, how the plugin will know the mp3 file has been already dowloaded?

Last edited by sebxx4; 11-15-2022 at 09:52.
sebxx4 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-15-2022 , 23:32   Re: Force to download specific file first
Reply With Quote #8

Quote:
Originally Posted by sebxx4 View Post
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.
__________________

Last edited by fysiks; 11-15-2022 at 23:35.
fysiks is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 11-16-2022 , 06:13   Re: Force to download specific file first
Reply With Quote #9

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.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 11-16-2022 at 06:17.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Stefanos
Senior Member
Join Date: May 2020
Old 11-16-2022 , 18:05   Re: Force to download specific file first
Reply With Quote #10

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
Stefanos 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:37.


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