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

Multi Sv_downloadurl v1.1


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management       
biscuit628
Senior Member
Join Date: Jun 2007
Location: 香港HongKong
Old 06-25-2009 , 07:49   Multi Sv_downloadurl v1.1
Reply With Quote #1

Multi Sv_downloadurl v1.1

Description:

Support multi webhost ,good for using free host server
--it's make for limited amount of bytes/month
--for free webhost user, it is very good,if not it is useless

How it work:

1.Make sure your webhost is work.
2.upload the same folder to your webhost.

Changelog:

1.1:downloadurl read from file
Attached Files
File Type: sma Get Plugin or Get Source (multi_sv_downloadurl.sma - 9273 views - 614 Bytes)
File Type: zip multi_svdownloadurl.zip (1.2 KB, 7441 views)
__________________
My Plugins

C4man with fun

Sniper Skill bonus
-------------------------
Sorry for my poor English!

Last edited by biscuit628; 07-12-2009 at 22:17.
biscuit628 is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 06-25-2009 , 08:02   Re: Multi Sv_downloadurl
Reply With Quote #2

Your cvars have amx_ prefix, not sv_ .
This method will not allow user to download all required files from urls if each of them contains only few required files. User will download some files from one url and then other remaining files directly from server. It will be only useful if you have all files on each url and you are worried about limited amount of bytes/month.
__________________
Impossible is Nothing

Last edited by Sylwester; 06-25-2009 at 08:05.
Sylwester is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 06-25-2009 , 08:07   Re: Multi Sv_downloadurl
Reply With Quote #3

I arranged the code for you

PHP Code:
#include <amxmodx>

const Urls 3
new CurrentUrl 0

new CvarNameBase[] = "sv_downloadurl "
new Cvars[Urls]

public 
plugin_init() 
{
    
register_plugin("Multi Sv_downloadurl","1.0","Biscuit")
    
    for(new 
i=0;i<Urls;i++)
    {
        
CvarNameBase[charsmax(CvarNameBase)] = 48 1
        Cvars
[i] = register_cvar(CvarNameBase,"")
    }
}
public 
client_connect(id)
{
    new 
downloadUrl[64]
    
    
get_pcvar_string(Cvars[CurrentUrl],downloadUrl,charsmax(downloadUrl))
    
set_cvar_string("sv_downloadurl",downloadUrl)
    
    
CurrentUrl = ++CurrentUrl Urls

__________________
joaquimandrade is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 06-25-2009 , 09:19   Re: Multi Sv_downloadurl
Reply With Quote #4

Can you make this ini file based so we can add multiple files instead of editing the script every single time
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
biscuit628
Senior Member
Join Date: Jun 2007
Location: 香港HongKong
Old 06-25-2009 , 10:46   Re: Multi Sv_downloadurl
Reply With Quote #5

Quote:
Originally Posted by Sylwester View Post
Your cvars have amx_ prefix, not sv_ .
This method will not allow user to download all required files from urls if each of them contains only few required files. User will download some files from one url and then other remaining files directly from server. It will be only useful if you have all files on each url and you are worried about limited amount of bytes/month.
yes, it's make for limited amount of bytes/month
for free host user, it is very good,if not it is useless


thanks joaquimandrade
but the code update already~

Quote:
Originally Posted by DruGzOG View Post
Can you make this ini file based so we can add multiple files instead of editing the script every single time
thanks for your suggestion,
update v1.1
__________________
My Plugins

C4man with fun

Sniper Skill bonus
-------------------------
Sorry for my poor English!
biscuit628 is offline
Contrenature
Member
Join Date: Nov 2008
Location: Latvia, Liepaya, Riga
Old 06-25-2009 , 10:56   Re: Multi Sv_downloadurl v1.1
Reply With Quote #6

How much i understand, with this plugin, we can use at real time, 2,3 and more http server links?!
Cose standart hlds support only 1 url addres.
If that is true, we see feature in this plugin..
Contrenature is offline
Send a message via Skype™ to Contrenature
shine771
Senior Member
Join Date: Jun 2007
Old 06-25-2009 , 12:01   Re: Multi Sv_downloadurl v1.1
Reply With Quote #7

No, it just changes the url to a different one every time you connect(a random url, not a different one).

Last edited by shine771; 06-25-2009 at 12:04.
shine771 is offline
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 06-25-2009 , 13:01   Re: Multi Sv_downloadurl v1.1
Reply With Quote #8

This rocks.
__________________
crazyeffect is offline
Send a message via MSN to crazyeffect
usabrad86
Junior Member
Join Date: Jun 2009
Location: Florida
Old 06-25-2009 , 22:44   Re: Multi Sv_downloadurl v1.1
Reply With Quote #9

If anybody is looking to use different sv_downloadurl for different maps just the the mapconfig that amxx comes with

here is a url to the DOC

http://wiki.amxmodx.org/Configuring_...p_Config_Files

to grab other peoples fast download urls just type "developer 1" in console and connect to the server that plays that map alot, then disconnect and read the console info on what the download url is

Example

//BUILD 4352 SERVER (0 CRC)
//Server # 104
//Serverinfo packet received.
//Clearing memory
//Remote host: Mistress's Haven of Zero Tolerance
//Spooling demo header.
//SteamWaitForResources() time: 0.034 seconds
Using http://helstrm.net/mistress/Mytunes/cstrike/ as primary download location
//Verifying and downloading resources...
//Error: server failed to transmit file 'sound/music/ChickenMod_Theme.mp3'
//Texture load: 32.0ms
//Setting up renderer...
//SKY: doom1rt, doom1bk, doom1lf, doom1ft, doom1up, doom1dn, //done
//Netchan_Clear() : reliable length not 0, reliable_sequence: 128, incoming_reliable_a

= where needed FastDownload Location is


Quote:
IF U USE THIS PLUGIN THE MAPCONFIG Trick WONT WORK
usabrad86 is offline
Send a message via AIM to usabrad86
Nashot
Member
Join Date: Mar 2009
Location: Localhost
Old 06-26-2009 , 05:26   Re: Multi Sv_downloadurl v1.1
Reply With Quote #10

Ohh, Nice Plugin, it routes the traffic to different servers.

Please clear my doubts:

1) Is it Really balance the traffic??
2) Is it auto synchronize the data (maps, sounds, models..etc) between urls ?
3) If one url goes down OR out of bandwidth, then is it re-routes the traffic to another url??
__________________

Nashot 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:33.


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