AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CSGO/TF2] CustomKeyValues (https://forums.alliedmods.net/showthread.php?t=306950)

hmmmmm 04-20-2018 03:00

[CSGO/TF2] CustomKeyValues
 
3 Attachment(s)
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:
https://camo.githubusercontent.com/7...3379522e706e67

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

TheXeon 04-20-2018 05:28

Re: [CSGO/TF2] CustomKeyValues
 
Good work! Very useful :)

:bacon!: 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_ 


hmmmmm 04-20-2018 07:09

Re: [CSGO/TF2] CustomKeyValues
 
Quote:

Originally Posted by TheXeon (Post 2588576)
Good work! Very useful :)

:bacon!: 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.

TheXeon 04-20-2018 21:36

Re: [CSGO/TF2] CustomKeyValues
 
Requires gamedata from here!

hmmmmm 04-20-2018 22:31

Re: [CSGO/TF2] CustomKeyValues
 
Quote:

Originally Posted by TheXeon (Post 2588654)

Grrrr, forgot to attach that. Thanks again.

Drixevel 04-21-2018 14:01

Re: [CSGO/TF2] CustomKeyValues
 
+1 :bacon:

Bara 10-26-2019 09:05

Re: [CSGO/TF2] CustomKeyValues
 
so btw.:
Code:

public __pl_customkeyvalues_SetNTVOptional()
should be
Code:

public void __pl_customkeyvalues_SetNTVOptional()

Drixevel 10-27-2019 02:12

Re: [CSGO/TF2] CustomKeyValues
 
1 Attachment(s)
Here's a simple fix for logic entities.

hmmmmm 10-27-2019 08:49

Re: [CSGO/TF2] CustomKeyValues
 
Gamedata for CS:GO updated

Quote:

Originally Posted by Bara (Post 2671009)
so btw.:
Code:

public __pl_customkeyvalues_SetNTVOptional()
should be
Code:

public void __pl_customkeyvalues_SetNTVOptional()

Quote:

Originally Posted by Drixevel (Post 2671117)
Here's a simple fix for logic entities.

Thanks, I've included your fixes

CrazyGhostRider 11-20-2019 07:09

Re: [CSGO/TF2] CustomKeyValues
 
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>


All times are GMT -4. The time now is 18:14.

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