Raised This Month: $32 Target: $400
 8% 

Force to download specific file first


Post New Thread Reply   
 
Thread Tools Display Modes
sebxx4
Senior Member
Join Date: Feb 2013
Old 11-16-2022 , 19:23   Re: Force to download specific file first
Reply With Quote #11

Guys, calm down, please.
So, what it looks like?
sebxx4 is offline
Stefanos
Senior Member
Join Date: May 2020
Old 11-16-2022 , 20:28   Re: Force to download specific file first
Reply With Quote #12

They said, try to put mp3 plugin above every other in plugins.ini
Stefanos is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-16-2022 , 23:02   Re: Force to download specific file first
Reply With Quote #13

Quote:
Originally Posted by Stefanos View Post
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
We all make mistakes. You clearly don't see everything I do.
__________________
fysiks is offline
sebxx4
Senior Member
Join Date: Feb 2013
Old 11-17-2022 , 15:58   Re: Force to download specific file first
Reply With Quote #14

Quote:
Originally Posted by Stefanos View Post
They said, try to put mp3 plugin above every other in plugins.ini
Ok, but even if mp3 will be downloaded as first, I need a way to detect it's downloaded already and can be played while other files are downloading. Or just reconnect player when mp3 is downloaded, but before the rest.

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

Quote:
Originally Posted by sebxx4 View Post
Ok, but even if mp3 will be downloaded as first, I need a way to detect it's downloaded already and can be played while other files are downloading. Or just reconnect player when mp3 is downloaded, but before the rest.
This statement doesn't make sense. If its downloaded, there is no reason to detect it. Are you trying to just play that audio on connect every time?

https://forums.alliedmods.net/showthread.php?t=52029

PHP Code:
#include amxmodx

public plugin_precache()
{
    
precache_generic("sound/connect.mp3");
}
public 
client_connect(id)
{
    
client_cmd(0"mp3 play ^"sound/connect.mp3^"");

__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-17-2022 , 19:17   Re: Force to download specific file first
Reply With Quote #16

Quote:
Originally Posted by sebxx4 View Post
Ok, but even if mp3 will be downloaded as first, I need a way to detect it's downloaded already and can be played while other files are downloading. Or just reconnect player when mp3 is downloaded, but before the rest.
The precaching system is built into the client so I doubt you'll be able to do some of those things.
__________________
fysiks is offline
sebxx4
Senior Member
Join Date: Feb 2013
Old 11-18-2022 , 02:32   Re: Force to download specific file first
Reply With Quote #17

Wtf, you really dont understand me, or what?
Look. A new player is connecting to my server. Its important he never played on my server before. Its his first time so he must download all the required files (lets say 10 of them); this mp3 file, some models and sprites. And now, I want the mp3 file to be downloaded as first. When its downloaded, I want to play it in loop to the client WHILE he's downloading the rest of the files (9 of them). It will lasts much longer than downloading the mp3 file so I want him to hear the music while he's waiting for rest of files to download. It's his first connection to my server.
C'mon guys, I dont know how to say it better.

Last edited by sebxx4; 11-18-2022 at 02:34.
sebxx4 is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 11-18-2022 , 06:27   Re: Force to download specific file first
Reply With Quote #18

Did you try ALL the other options we provided?
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
sebxx4
Senior Member
Join Date: Feb 2013
Old 11-18-2022 , 07:57   Re: Force to download specific file first
Reply With Quote #19

Well, only one that make sense is to put my plugin at the top of plugins.ini.
I still need a way to detect if mp3 file download has been completed.
sebxx4 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-18-2022 , 12:38   Re: Force to download specific file first
Reply With Quote #20

There is a good chance that it's not possible due to the way that the game/engine was designed. I've never heard of a way to know if a file is downloaded in the middle of downloading, the precache system just insures that all precached files exist (which is where the client-side code comes into play).

You're welcome to wait and see if someone else can figure out a workaround. Not everything is possible.
__________________
fysiks 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 08:37.


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