Jump to content

Door Escape Blocker | DEB

Recommended Posts

This is a modified version of a script i was using a long time to block esc on a custom spawn selection screen i'm using on our

vanilla dayz servers.


What this does is check for keypresses when the doorlock ui is active, when it detects the user pressing esc it cancles the actions. 

This effectivly blocks the user from closing the dialog with the escape button. Have fun with it.


Create a new file called antiBruteForce.sqf

NPG_fnc_cKeyDownGenericDisplay = {
    _keypressed = _this select 1;
    _return = false;

    #define KEYSCODE_ESC_KEY    1

    // disable esc while in dialog
    switch (_keypressed) do
        case KEYSCODE_ESC_KEY:
            _return = true;

[] spawn {
waitUntil {sleep 0.01; (!(isNull (findDisplay 41144)))};
_foundComboLockUI = findDisplay 41144;
_foundComboLockUI displayAddEventHandler ["KeyDown","_this call NPG_fnc_cKeyDownGenericDisplay"];

Now you can include the file. It has to be run on the client so make shure it is somewhere included

inside a if(!isDedicated) {}; check and make shure that your path to this file is set according to its location in your mission.

#include "antiBruteForce.sqf"

I'll try to update this script tonight as i dont think it needs the spawn and waituntill. But this version does work for shure.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Advertisement
  • Supporters
  • Discord

  • Create New...