Raised This Month: $100 Target: $400
 25% 

HTTP Downloader


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose        Approver:   Hawk552 (427)
Bentski
Junior Member
Join Date: Jun 2007
Old 11-12-2007 , 09:58   HTTP Downloader
Reply With Quote #1

HTTP Downloader v1.0

Description

Allows server to download files from the web.
Useful for plugins that need auto-updater.

Requirements
  • Amx Mod X 1.76 or greater
  • Sockets module
Note: default download limit is 10. to change it open include/httpdl.inc and change the value of MAX_DOWNLOADS then recompile then plugin.

Example

PHP Code:
#include <amxmodx>
#include <httpdl>

public plugin_init() {
    
register_clcmd("say /dl""test");
}

public 
test(id) {
    new 
dlid download("http://google.com/""addons/amxmodx/data/google.txt");
}

// Called when file is downloaded
public dlcomplete(idfile[]) {
    
server_print("Downloaded (id: %d) %s"idfile);

Attached Files
File Type: sma Get Plugin or Get Source (httpdl.sma - 7118 views - 2.7 KB)
File Type: inc httpdl.inc (767 Bytes, 4060 views)
File Type: zip httpdl.zip (2.2 KB, 4908 views)

Last edited by Bentski; 11-15-2007 at 14:31.
Bentski is offline
vvg125
AMX Mod X Beta Tester
Join Date: Dec 2006
Location: Queens (Douglaston), New
Old 11-12-2007 , 10:24   Re: HTTP Downloader
Reply With Quote #2

Interesting.... And definitely unique.
__________________
vvg125 is offline
Send a message via AIM to vvg125 Send a message via MSN to vvg125 Send a message via Yahoo to vvg125
ABC3Q
Junior Member
Join Date: Mar 2007
Old 11-12-2007 , 11:37   Re: HTTP Downloader
Reply With Quote #3

sv_downloadurl does the same thing if you're missing a file.
__________________
| Account has been abandoned |
ABC3Q is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 11-12-2007 , 11:41   Re: HTTP Downloader
Reply With Quote #4

Quote:
Originally Posted by ABC3Q View Post
sv_downloadurl does the same thing if you're missing a file.
Not really, you can't download other files than ".wav/.mp3/.bsp/...", with this you can download any file ;)

WootZ! Gj
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Old 11-12-2007, 11:41
dangerix
This message has been deleted by dangerix. Reason: too slow
Toster v2.1
Senior Member
Join Date: Oct 2006
Location: Latvia, Riga
Old 11-12-2007 , 12:10   Re: HTTP Downloader
Reply With Quote #5

Gj! +K
__________________
I am 52% addicted to Counterstrike. What about you?
Toster v2.1 is offline
Send a message via Skype™ to Toster v2.1
hackziner
Senior Member
Join Date: Sep 2006
Location: France
Old 11-12-2007 , 14:08   Re: HTTP Downloader
Reply With Quote #6

Ah nice

Quote:
// is there a better way to write binary data to a file? :S
I don't think so ... other functions (fwrite_blocks,...) are still not working
__________________
hackziner is offline
Send a message via ICQ to hackziner Send a message via AIM to hackziner Send a message via MSN to hackziner Send a message via Yahoo to hackziner Send a message via Skype™ to hackziner
travo
Senior Member
Join Date: Aug 2006
Old 11-12-2007 , 15:18   Re: HTTP Downloader
Reply With Quote #7

ahh very nice. but what files would you want to download other than the map related files? and what uses would they hold?
travo is offline
Bentski
Junior Member
Join Date: Jun 2007
Old 11-12-2007 , 15:22   Re: HTTP Downloader
Reply With Quote #8

Quote:
Originally Posted by travo View Post
ahh very nice. but what files would you want to download other than the map related files? and what uses would they hold?
Plugin or config updates. Anything that must be up to date
Bentski is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-12-2007 , 16:01   Re: HTTP Downloader
Reply With Quote #9

Cool, you can make players download the nextmap before the map loads.
ConnorMcLeod is offline
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 11-12-2007 , 16:11   Re: HTTP Downloader
Reply With Quote #10

Definitely a unique idea!!
__________________
M249-M4A1 is offline
Reply


Thread Tools
Display Modes

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 05:15.


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