View Single Post
Author Message
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
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, 346 views)
File Type: sp Get Plugin or Get Source (customkeyvalues.sp - 419 views - 4.3 KB)
File Type: txt customkeyvalues.games.txt (249 Bytes, 329 views)

Last edited by hmmmmm; 10-27-2019 at 09:50. Reason: Add gamedata
hmmmmm is offline