Skip to content

"screenshot" control doesn't work in (most) scripting functions #563

@ArranTuna

Description

@ArranTuna

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

From https://bugs.mtasa.com/view.php?id=5402

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions