HTTP Downloader

Post Reply
greenie
Full Member
Full Member
Posts: 1815
Joined: Sun Nov 21, 2021 4:55 pm
Jucator SA:MP ?: Nu
Nick:: greenie
Jucator CS ?: Nu

HTTP Downloader

Post by greenie »

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
#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(id, file[]) {
server_print("Downloaded (id: %d) %s", id, file);
}
.zip
Post Reply

Return to “General Purpose”