[ANY] Input Hooks - DevTools (1.9) [15-Jun-2022]
23 Attachment(s)
Related Plugins: About:
Supported Games:
Thanks:
Admin Commands: (requires "z" flag) PHP Code:
ConVars: Saved to sm_input_hooks.cfg in your servers \cfg\sourcemod\ folder. PHP Code:
Changes: Code:
1.9 (15-Jun-2022)Requirements: Installation: DO NOT click 'Get Plugin' or it will fail to compile because this plugin requires DHooks!
Updating from 1.1 or older:
|
Re: [ANY] Input Hooks - DevTools
Thanks again. This make development a looooooot easier.
|
Re: [ANY] Input Hooks - DevTools
No.1 ....
|
Re: [ANY] Input Hooks - DevTools
not bad :up:
|
Re: [ANY] Input Hooks - DevTools
very nice, it will be helpful
|
Re: [ANY] Input Hooks - DevTools (1.1) [15-Nov-2019]
Plugin updated.
Quote:
|
Re: [ANY] Input Hooks - DevTools (1.3) [16-Mar-2020]
Code:
1.3 (16-Mar-2020)Code:
PrintToServer("%s", command); |
Re: [ANY] Input Hooks - DevTools (1.4) [10-May-2020]
https://crash.limetech.org/gv4g4mf7khdl
linux sm 1.10 dhooks for 1.10 PHP Code:
|
Re: [ANY] Input Hooks - DevTools (1.4) [10-May-2020]
He does the same thing here:
PHP Code:
|
Re: [ANY] Input Hooks - DevTools (1.4) [10-May-2020]
Quote:
It has a specific check for reading "InValue" commands which would crash when reading with any other method, there maybe other commands which need to be read as objects instead, you can debug where its crashing by printing/logging the "command" variable value and seeing the last one printed before crash, and let me know what it is so I can fix the plugin. Quote:
The plugin should probably be checking EntRefToEntIndex != INVALID_ENT_REFERENCE after converting but I don't see why an input triggered at this stage would ever be an invalid entity (probably the reason I left out the check to see if anyone reports an invalid entity error - I specifically do this for various plugins where I think a check would not have to be required and wait for any error reports, rarely some trigger errors and sometimes only very rarely). |
Re: [ANY] Input Hooks - DevTools (1.4) [10-May-2020]
Quote:
I dhook AcceptInput on SDKHook_SpawnPost and no crashes. |
Re: [ANY] Input Hooks - DevTools (1.4a) [10-May-2020]
I have found a plugin conflict with [L4D2] Gas Cans by disawar1.
After many tests, I noticed that on c1m4_atrium map, when I enable the listen mode (sm_input_listen), right after pressing the elevator button the server crashes. Here is the crash log. I extracted the part from disawar1 code that triggers the crash and made a short plugin to test it. To reproduce: Go to c1m4_atrium map, use !input_listen and then !testcrash. Just reporting in case someone has the same problem. Code snippet for testing below:
Spoiler
EDIT: Fixed by Silvers in newer versions. |
Re: [ANY] Input Hooks - DevTools (1.5) [03-Mar-2021]
Thanks, fixed. Example crash plugin was very helpful to test.
|
Re: [ANY] Input Hooks - DevTools (1.5) [03-Mar-2021]
Quote:
https://github.com/ValveSoftware/sou...ariant_t.h#L37 |
Re: [ANY] Input Hooks - DevTools (1.5) [03-Mar-2021]
Quote:
|
Re: [ANY] Input Hooks - DevTools (1.5) [03-Mar-2021]
Quote:
|
Re: [ANY] Input Hooks - DevTools (1.5) [03-Mar-2021]
Quote:
|
Re: [ANY] Input Hooks - DevTools (1.5) [03-Mar-2021]
Quote:
But you could try this: I don't know if the offset should be divided by sizeof(int). int fieldtype = DHookGetParamObjectPtrVar(hParams, 4, offset_of_fieldType, ObjectValueType_Int), then check if fieldtype == FIELD_STRING or FIELD_INTEGER or some other type here: https://github.com/ValveSoftware/sou.../datamap.h#L28 |
Re: [ANY] Input Hooks - DevTools (1.5) [03-Mar-2021]
I don't think that's the same offset as NetProps and DataMaps which would be possible to get the param type.
|
Re: [ANY] Input Hooks - DevTools (1.5) [03-Mar-2021]
Quote:
The acceptinput function you are hooking has a variant_t struct. AcceptInput( const char *szInputName, CBaseEntity *pActivator, CBaseEntity *pCaller, variant_t Value, int outputID ); You have the definition of this struct right here: PHP Code:
Anyway I didn't want to spent any more time on this, but I was confused by what you meant and thought it couldn't be that hard so I decided to try it myself and it works. PHP Code:
2091 math_counter. (GetValue). "counter" (). 1 player caller 50 param type 1 2079 info_target. (InValue). "case" (). 1 player caller 50 |
Re: [ANY] Input Hooks - DevTools (1.5) [03-Mar-2021]
Quote:
|
Re: [ANY] Input Hooks - DevTools (1.6) [20-May-2021]
https://crash.limetech.org/odrgfbzpfqnt
DHookGetParamObjectPtrString crashed the server |
Re: [ANY] Input Hooks - DevTools (1.6) [20-May-2021]
Quote:
Fixed. Thanks for testing! Code:
1.7 (10-Apr-2022) |
| All times are GMT -4. The time now is 22:28. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.