HTTPX_IsPaused

Automatic updating Updates current plugin automatically (from AlliedModders webpage only to prevent spreading of malicious code). file_id[] has to be the same as it is on the forum webpage. (Check the link of the .amxx file ("Get Plugin" link)) If frequency is supplied you can set how often to update the file. If none is provided it will update as soon as possible. Please use this respectfully. Don't overload the AM forums. You can however provide your own method of determining whether the file needs to be updated or not before calling this function. That way you don't stress AM servers when not required. An example of this is in the HTTPX source which uses this method. Examples: 1d = 86400 1w = 604800 30d = 2592000 IMPORTANT! The reason for this not being a native is that it does not halt the plugin if HTTPX is not running. HTTPX and automatic updating is optional. Use this example instead. the File ID is the attachment in your post on the AM forums. Only use the ID, not the whole URL. For example: The plugin Name Replacer by anakin_cstrike, @http://forums.alliedmods.net/showthread.php?t=77401&highlight=replacer Scroll down and hover the "Get Plugin", there you see the file ID. Just replace the placeholder with that value. #define AUTOUPDATE_FILE_ID "76775" Add the time or create your own method of deciding when it's supposed to be updated and you're done. #define AUTOUPDATE_FILE_ID "REPLACE_THIS_WITH_YOUR_FILE_ID" #define AUTOUPDATE_HOW_OFTEN REPLACE_THIS_WITH_DESIRED_FREQUENCY // 1d = 86400, 1w = 604800, 30d = 2592000 UpdatePlugin() { if ( callfunc_begin("AutoupdatePlugin", "httpx.amxx") == 1 ) { // Don't touch. callfunc_push_int(get_plugin(-1)) // Plugin ID (to get the filename). Don't touch. callfunc_push_str(AUTOUPDATE_FILE_ID, false) // The file_id in string format. Touch above. callfunc_push_int(AUTOUPDATE_HOW_OFTEN) // Frequency of the automatic updates. Touch above. callfunc_end() // Don't touch. } }

Syntax

native bool:HTTPX_IsPaused(DownloadID) /** * HTTPX_Paused(DownloadID) * * Pauses the download. **/ native HTTPX_Pause(DownloadID) /** * HTTPX_Unpause(DownloadID) * * Unpauses the download. **/ native HTTPX_Unpause(DownloadID) /** * HTTPX_Abort(DownloadID, bool:DeleteFile = true) * * Aborts the transfer of selected download DownloadID. * If DeleteFile is set to true the partially downloaded file will be deleted. **/ native HTTPX_Abort(DownloadID, bool:DeleteFile = true) /** * HTTPX_AddPostVar(const variable[], const value[]) * * Adds a POST variable to the request. * This function is used before HTTPX_Download() or HTTP_AddToQue(), similar to set/show hudmessage. * It can be used multiple times before each download.

Usage

DownloadID

Return

bool — This function has no return value.

Defined in httpx.inc at line 125 . This documentation was automatically generated from source.