Commit Graph
4 Commits
Author SHA1 Message Date
BotoX 865fa37ed9 Added hack to make plugins open a menu with all possible targets on ReplyToTargetError COMMAND_TARGET_AMBIGUOUS.
Explanation:
There are two clients in the server, one named gene, the other one "Ene ~special characters~".
An admin issues "sm_slay Ene" and gets following error message: More than one client matched the given pattern.
What this hack will do is: Use GetCmdArg(0, ...); to get the command name "sm_slay".
Use GetCmdArgString(...); to get the arguments supplied to the command.
Use GetLastProcessTargetString(...); (which was implemented in this commit) to retrieve the arguments that were passed to the last ProcessTargetString call.
It will then pass this data to the DynamicTargeting plugin through its AmbiguousMenu native.
The plugin will open up a menu on the client and list all targets which match the pattern that was supplied to ProcessTargetString.
If the client selects a menu entry, FakeClientCommand will be used to re-execute the command with the correct target.
2019-09-21 20:29:53 +02:00
BotoX 6fae1811d9 Added client id to MultiTargetFilter forward. 2019-09-21 20:29:27 +02:00
BotoX 7b476e4532 Add more macros to CDetour. 2019-09-21 20:20:37 +02:00
BotoX ba7fedca6e Remove -Werror, does not compile on GCC due to warning in source SDK. 2019-09-21 20:20:21 +02:00