Raised This Month: $61 Target: $400

[INC] DTC - DownloadTableConfig

Post New Thread Reply   
Thread Tools Display Modes
Author Message
Veteran Member
Join Date: Nov 2012
Location: void
Old 04-02-2015 , 15:08   [INC] DTC - DownloadTableConfig
Reply With Quote #1

Ciao guys,

I made this include for my plugins and now I decided to make it public for you all.

With DTC you can easily create download config and give some files prefixes, which highlight that file on config loading (and also can contain some arguments set by server master).
You no more need to create bunch of convars or KeyValue config for settings of your files (like scale of the texture, team for the texture etc.).

More info and downloads in GitHub repository and if you find any bugs, let me know please.

Config example:
PHP Code:
// comment line
# comment line
comment line

[GamePrepare 3]     sound/timeleft/en/unreal/3sec.mp3
[GamePrepare 2]     sound/timeleft/en/unreal/2sec.mp3
[GamePrepare 1]     sound/timeleft/en/unreal/1sec.mp3

[GameEnd RedTeam]   sound/sm_hosties/noscopestart1.mp3
[GameEnd BlueTeam]  sound/sm_hosties/noscopestart1.mp3

[PlayerSkin Redmodels/player/prisoner/prisoner_red_fix.mdl

[PlayerSkin Bluemodels/player/prisoner/prisoner_blue_fix.mdl

[Mark Red 12.0 0.125materials/decals/custom/redstar.vmt

[Mark Blue 12.0 0.125materials/decals/custom/bluestar.vmt
How to use:
  1. Include DTC
    PHP Code:
    #include <dtc> 
  2. Create config (optional)
    PHP Code:
    public OnPluginStart()

    OnCreateConfig(String:sConfigPath[], Handle:hConfigFile)
    WriteFileLine(hConfigFile"// [Mark <team> <scale> <offset>]");
    WriteFileLine(hConfigFile"[Mark Red 0.125 12.0] materials/sprites/laserbeam.vmt");

  3. Load config
    PHP Code:
    public OnPluginStart()

    OnFile(String:sFile[], String:sPrefixName[DTC_MAX_NAME_LEN], Handle:hArgs)
    // Catch file with prefix "Mark"
    if (StrEqual(sPrefixName"Mark")) {

    DTC_GetArg(hArgs1sHelpersizeof(sHelper), "ERROR");

    LogMessage("File = '%s'"sFile);
    LogMessage("Arg1 = '%s'"sHelper);
    LogMessage("Arg2 = '%.3f'"DTC_GetArgFloat(hArgs20.0));
    LogMessage("Arg3 = '%.3f'"DTC_GetArgFloat(hArgs3, -1.0));

Last edited by KissLick; 04-04-2015 at 16:42.
KissLick is offline
Join Date: May 2014
Old 05-01-2015 , 06:34   Re: [INC] DTC - DownloadTableConfig
Reply With Quote #2

works well, I used this.
lowie is offline
Veteran Member
Join Date: Nov 2012
Location: void
Old 05-02-2015 , 18:01   Re: [INC] DTC - DownloadTableConfig
Reply With Quote #3

Thx, any suggestions appreciated.
KissLick is offline

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 01:04.

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