-
-
Notifications
You must be signed in to change notification settings - Fork 488
Fixes #3160 - New onClientCommand
event
#4426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Fixes #3160 - New onClientCommand
event
#4426
Conversation
strClumpedCommand = UTF16ToMbUTF8(strClumpedCommandUTF); | ||
|
||
g_pClientGame->GetRegisteredCommands()->ProcessCommand(szCommandBufferPointer, szArguments); | ||
CommandExecutionResult commandResult = g_pClientGame->GetRegisteredCommands()->ProcessCommand(szCommandBufferPointer, szArguments, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So now, when you type /foo, do you see the message "Unknown command or cvar"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I fixed this .. they get silently sent to the server. My implementation preserves this original behavior:
- If command is cancelled by onClientCommand → return true (don't send to server, don't show unknown command)
- If command is not cancelled → continue normal flow (send to server, return true)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops .. wait i need to check your suggestion again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done @FileEX
2025-09-08.12-29-13.mp4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed ✅
Usage
Testing Script
Fixes #3160