-
-
Notifications
You must be signed in to change notification settings - Fork 535
Description
Describe the bug
Simply said, it doesn't work. The only function that works with this control is getBoundKeys. While according to the wiki, addCommandHandler and toggleControl should work with this control as well:
http://wiki.multitheftauto.com/wiki/Control_names#MTA_hard-coded_commands
In case you wonder why someone would want to detect or block screenshots, here's why: I've been playing Race a lot recently, and on the server where I usually play, some people tend to lag a lot. These players have a significant advantage over other people, because they aren't pushed into the water quite as easily as a non-lagging player. Someone, however, came up with the idea to create lag by repeatedly pressing F12. In this way, he has the ability to create lag whenever he desires, and therefore is hard to push into the water at certain moments.
Now, if one person would be the entire problem, banning the person would mean the problem is gone. But other players are now using the same method as well, so I'm asking for a way to block (or at least detect) screenshots. This saves the server a lot of hassle and cheating players, while it saves the cheating players several GBs of useless screenshots.
To reproduce
Try:
toggleControl("screenshot",false) --> Returns false
addCommandHandler("screenshot", function() outputChatBox("a" end) --> Pressing F12 doesn't output a.
toggleAllControls(false,true,true) --> Returns true, but doesn't block "screenshot"
Expected behaviour
It might be useful for someone if screenshot bind would work like other binds.
Screenshots
Version
v1.5.6-release-14414
Additional context