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

[INC] HTTP


Post New Thread Reply   
 
Thread Tools Display Modes
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-25-2015 , 20:45   Re: [INC] HTTP
Reply With Quote #41

Quote:
Originally Posted by feskolech View Post
I don't understand, sorry
PHP Code:
HTTP_DownloadFile"http://site.ru/plugins/myplugin.amxx" "addons/amxmodx/plugins/myplugin.amxx" );
        
HTTP_DownloadFile"http://site.ru/plugins/plugins-system.ini" "addons/amxmodx/configs/plugins-system.ini" ); 
It means "are the files downloading?"
__________________
Bugsy is offline
safetymoose
Senior Member
Join Date: Feb 2015
Old 12-03-2015 , 10:33   Re: [INC] HTTP
Reply With Quote #42

What happens if clients have the required files? Does the include check if clients have the files, or do they download them every time?
safetymoose is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-03-2015 , 10:46   Re: [INC] HTTP
Reply With Quote #43

This does not download to the client machine, only to the server.
__________________
Bugsy is offline
safetymoose
Senior Member
Join Date: Feb 2015
Old 12-03-2015 , 12:06   Re: [INC] HTTP
Reply With Quote #44

Quote:
Originally Posted by Bugsy View Post
This does not download to the client machine, only to the server.
oh... Is there a way to download files for clients similar to this? I believe sv_download_url only works for files that are precached. My idea is mainly about downloading sounds tho..
safetymoose is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-05-2015 , 15:55   Re: [INC] HTTP
Reply With Quote #45

Quote:
Originally Posted by safetymoose View Post
oh... Is there a way to download files for clients similar to this? I believe sv_download_url only works for files that are precached. My idea is mainly about downloading sounds tho..
No, you would use precache_sound() for downloading required sound files.
__________________
Bugsy is offline
safetymoose
Senior Member
Join Date: Feb 2015
Old 12-05-2015 , 19:25   Re: [INC] HTTP
Reply With Quote #46

Quote:
Originally Posted by Bugsy View Post
No, you would use precache_sound() for downloading required sound files.
Yes i know, but i wanted to try something different. If clients can somehow download the required sounds without precaching them in plugins, then i could play those sounds using cmd_client spk. I would avoid precaching all those extra custom sounds, and that would greatly lower the precache count.

I dont want to drive your thread off topic, my question is can this include be made to be used for downloading files to clients? Or better yet, do you know any way to achieve that?

Last edited by safetymoose; 12-05-2015 at 19:26.
safetymoose is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-05-2015 , 19:45   Re: [INC] HTTP
Reply With Quote #47

No, cannot be done for clients. This is only for files on the server.
__________________
Bugsy is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-06-2015 , 21:45   Re: [INC] HTTP
Reply With Quote #48

Quote:
Originally Posted by safetymoose View Post
Yes i know, but i wanted to try something different. If clients can somehow download the required sounds without precaching them in plugins, then i could play those sounds using cmd_client spk. I would avoid precaching all those extra custom sounds, and that would greatly lower the precache count.

I dont want to drive your thread off topic, my question is can this include be made to be used for downloading files to clients? Or better yet, do you know any way to achieve that?

I'm quite sure that you can't play sounds that are not precached because they won't be in memory ready for use and I don't think the game can dynamically load sound files.
__________________
fysiks is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-07-2015 , 07:07   Re: [INC] HTTP
Reply With Quote #49

So far I remember client can dynamically load in memory the sound if it needs. Any sounds played with "sp[ea]k" command doesn't need to be loaded server-side. You can just use precache_generic to make client downloading file. It's required to use precache_sound when sound is emitted server-side though.
__________________

Last edited by Arkshine; 12-07-2015 at 07:09.
Arkshine is offline
safetymoose
Senior Member
Join Date: Feb 2015
Old 12-07-2015 , 12:34   Re: [INC] HTTP
Reply With Quote #50

Quote:
Originally Posted by Arkshine View Post
So far I remember client can dynamically load in memory the sound if it needs. Any sounds played with "sp[ea]k" command doesn't need to be loaded server-side. You can just use precache_generic to make client downloading file. It's required to use precache_sound when sound is emitted server-side though.
That's what i'm saying, using cmd spk doesn't require precaching the sounds, they just need to be in the client's directory to be played. The main issue is making sure the clients have these sounds, if i can make the clients download these sounds on connect, i can greatly reduce the precache count and have more space for custom sprites and models.

Can something like this be made?
safetymoose 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 17:27.


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