Raised This Month: $12 Target: $400
 3% 

[CSGO/TF2] CustomKeyValues


Post New Thread Reply   
 
Thread Tools Display Modes
Author
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Plugin ID:
6105
Plugin Version:
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Old 04-20-2018 , 03:00   [CSGO/TF2] CustomKeyValues
    Reply With Quote #1

    Pretty much like this extension I made, but in plugin form so it isn't such a hassle for others to use.

    This plugin was made with the idea of allowing easy transfer of information between maps/mappers and plugins.

    Mappers can add keys/values for entities through hammer by clicking "Smart Edit" and filling in the boxes:


    Then, once the map is loaded on the server, the plugin will pick up any keys/values that the server tries to throw out, and provides a native to allow plugins to easily get them.
    Following from the example of the image above:
    PHP Code:
    char tier[8];
    bool success GetCustomKeyValue0"mod_tier"tiersizeoftier ) );
    PrintToServer"Map tier: %i (%s)"StringToInttier ), success "success" "failure" );
        
    // output: "Map tier: 3 (success)" 
    Note: This plugin requires the DHooks extension
    Attached Files
    File Type: inc customkeyvalues.inc (661 Bytes, 340 views)
    File Type: sp Get Plugin or Get Source (customkeyvalues.sp - 414 views - 4.3 KB)
    File Type: txt customkeyvalues.games.txt (249 Bytes, 323 views)

    Last edited by hmmmmm; 10-27-2019 at 09:50. Reason: Add gamedata
    hmmmmm is offline
    TheXeon
    Member
    Join Date: May 2016
    Old 04-20-2018 , 05:28   Re: [CSGO/TF2] CustomKeyValues
    Reply With Quote #2

    Good work! Very useful

    for new declarations!

    Only thing I see is adding some double include protection like this:

    PHP Code:
    #if defined _CUSTOMKEYVALUES_INC_
     #endinput
    #endif
    #define _CUSTOMKEYVALUES_INC_ 
    TheXeon is offline
    hmmmmm
    Great Tester of Whatever
    Join Date: Mar 2017
    Location: ...
    Old 04-20-2018 , 07:09   Re: [CSGO/TF2] CustomKeyValues
    Reply With Quote #3

    Quote:
    Originally Posted by TheXeon View Post
    Good work! Very useful

    for new declarations!

    Only thing I see is adding some double include protection like this:

    PHP Code:
    #if defined _CUSTOMKEYVALUES_INC_
     #endinput
    #endif
    #define _CUSTOMKEYVALUES_INC_ 
    I think that was meant to be in there, good catch.
    hmmmmm is offline
    TheXeon
    Member
    Join Date: May 2016
    Old 04-20-2018 , 21:36   Re: [CSGO/TF2] CustomKeyValues
    Reply With Quote #4

    Requires gamedata from here!
    TheXeon is offline
    hmmmmm
    Great Tester of Whatever
    Join Date: Mar 2017
    Location: ...
    Old 04-20-2018 , 22:31   Re: [CSGO/TF2] CustomKeyValues
    Reply With Quote #5

    Quote:
    Originally Posted by TheXeon View Post
    Grrrr, forgot to attach that. Thanks again.
    hmmmmm is offline
    Drixevel
    AlliedModders Donor
    Join Date: Sep 2009
    Location: Somewhere headbangin'
    Old 04-21-2018 , 14:01   Re: [CSGO/TF2] CustomKeyValues
    Reply With Quote #6

    +1
    Drixevel is offline
    Bara
    AlliedModders Donor
    Join Date: Apr 2012
    Location: Germany
    Old 10-26-2019 , 09:05   Re: [CSGO/TF2] CustomKeyValues
    Reply With Quote #7

    so btw.:
    Code:
    public __pl_customkeyvalues_SetNTVOptional()
    should be
    Code:
    public void __pl_customkeyvalues_SetNTVOptional()
    __________________
    Discord (Bara#5006) | My Plugins (GitHub)
    You like my work? Support is not a crime.

    Last edited by Bara; 10-26-2019 at 09:05.
    Bara is offline
    Drixevel
    AlliedModders Donor
    Join Date: Sep 2009
    Location: Somewhere headbangin'
    Old 10-27-2019 , 02:12   Re: [CSGO/TF2] CustomKeyValues
    Reply With Quote #8

    Here's a simple fix for logic entities.
    Attached Files
    File Type: sp Get Plugin or Get Source (customkeyvalues.sp - 200 views - 4.3 KB)
    Drixevel is offline
    hmmmmm
    Great Tester of Whatever
    Join Date: Mar 2017
    Location: ...
    Old 10-27-2019 , 08:49   Re: [CSGO/TF2] CustomKeyValues
    Reply With Quote #9

    Gamedata for CS:GO updated

    Quote:
    Originally Posted by Bara View Post
    so btw.:
    Code:
    public __pl_customkeyvalues_SetNTVOptional()
    should be
    Code:
    public void __pl_customkeyvalues_SetNTVOptional()
    Quote:
    Originally Posted by Drixevel View Post
    Here's a simple fix for logic entities.
    Thanks, I've included your fixes
    hmmmmm is offline
    CrazyGhostRider
    Member
    Join Date: Apr 2014
    Location: Russia
    Old 11-20-2019 , 07:09   Re: [CSGO/TF2] CustomKeyValues
    Reply With Quote #10

    Not compiled
    tf\addons\sourcemod\scripting\include\dhooks. inc(263) : error 139: could not find type "SDKFuncConfSource"

    Installed the latest "dhooks-2.2.0-detours9-sm110"



    P.s.
    I fixed it. Need to add
    #include <sdktools>

    Last edited by CrazyGhostRider; 11-20-2019 at 12:45. Reason: fixed
    CrazyGhostRider 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 16:07.


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