View Single Post
Author Message
Byte
Senior Member
Join Date: Jun 2010
Location: 📦 CCSPlayer
Old 12-31-2016 , 18:47   [ANY] EasyDownloader (V1.03, 09/12/2017)
Reply With Quote #1

Easy Downloader (V1.03)
Download and Precache files the easy way.

By Byte

🔹 Description 🔹
This plugin is a simple downloader plugin which downloads/precaches files on any mod.


🔹 Instructions 🔹
  1. Compile easydownloader.sp
  2. Copy easydownloader.smx to your server.
  3. Configure files to download/precache by editing text files in /config/easydownloader
  4. Change map on server.

🔹 Configuration 🔹
Use file/directory paths relative to gamedir root (so include "sound/", "materials/" etc).
One file/directory path per line in the relevant config file.
Directory paths should NOT end with a separator character ('/')
Directories are downloaded recursively.
Blank lines and comment lines (starting with //) are ignored.
  • decals.txt - Uses API function PrecacheDecal. For: .vtf,.vmt
  • generics.txt - Uses API function PrecacheGeneric. For: .pcf
  • models.txt - Uses API function PrecacheModel. For: .mdl
  • sentencefiles.txt - Uses API function PrecacheSentenceFile
  • sounds.txt - Uses API function PrecacheSound. For: .mp3, etc
  • downloadonly.txt - Downloads only. No precaching. For: .phy,.vvd,.vtx,.vtf,.vmt, etc

🔹 Options 🔹
Extension whitelisting
You can whitelist certain extensions when using recursive directory downloading.
When using this option, only files with the provided extensions will be downloaded/precached.

Example in models.txt:
Code:
//Download all .mdl files from the folder below
models/player/custom_player/some_folder|exts=.mdl
Example in downloadsonly.txt:
Code:
//Download the other model files required
models/player/custom_player/some_folder|exts=.dx90.vtx,.phy,.vvd
materials/models/player/some_folder|exts=.vmt,.vtf
🔹 Acknowledgements 🔹
I decided to write this plugin after SM File/Folder Downloader and Precacher (https://forums.alliedmods.net/showthread.php?t=69005) stopped working for me.
Huge props to SWAT_88 though, RIP buddy ❤️

Powerlord: CSGO/DOTA Asterisk fake precache method (link)


🔹 Changelog 🔹
Code:
1.03 Added extension filtering for recursive directory downloads. Naming convention cleanup. 
1.02 Fixed sound precaching for CSGO/DOTA game engines.
1.01 Added support for recursive directory downloading and download only mode.
1.00 Initial release
🔹 Downloads 🔹

Github Repo:

Source | Releases

AlliedModders Mirror:
Attached Files
File Type: zip config.zip (1.5 KB, 2174 views)
File Type: sp Get Plugin or Get Source (easydownloader.sp - 3128 views - 7.5 KB)
__________________
STEAM: /id/invexbyte | Github: Mo Beigi | Discord: Byte#0017
Community: Invex Gaming | My Plugins: Click Me!


Last edited by Byte; 12-10-2017 at 13:25. Reason: Update for V1.03
Byte is offline