Jump to content
Zupa

[Release] 3.0 Door Management - No More Codes

Recommended Posts

[RELEASE] Door Management - No More Codes
 




First release ONLY for Plot 4 Life users. 

 

Tired of giving in codes? Which code belongs to which door anyways? Geezus, some guy put a bot on my door to break the code. FUCK THAT

 

Here comes Door Management. Throw away your codes and enjoy a simple eye scan. Add your friends to your list on the door an enjoy a stress free "door opening" experience. Door opening too fast? dont worry just put the opening time a bit longer. 

 

Inspired by plotManagement but now for Doors!

 

 

sEQTCPz.jpg

 

 

 

If you press the unlock action you will not see a code dialog anymore. My dialog overwrites this dialog with my personal one. Here you get to simple action to press  EYE SCAN. This will open the door after 2 seconds of scanning. Fails when you are not on the manage list ofcourse. Only people on the manage list can manage the door ofcourse. Owner will be alwyas highest authority and can never be erased. (Thanks P4L - Rimblock).

 

[insert Image of the manage window here when i'm @ home, or anyone else provide it in the meantime]

 

If you press manual code you get the old dialog back. You can disable this in the config section.

 

This Scripts DOES not change anything gamebreaking or database related. The door code is still being used, but only codewise (back-end). You dont see anything in the front-end.

 

Instructions
 

 

0 - Download the files from github:

 

https://github.com/DevZupa/DoorManagement

 

 

1 - in your description.ext: ( Mission PBO ) 

 

Add to the bottom: ( THE DEFINES IS UPDATED, overwrite any other defines i gave u at other mods of mine!)

If you get any duplicates of classes, just delete them from the defines.hpp, problem solved.

#include "doorManagement\defines.hpp"
#include "doorManagement\doorUnlock.hpp"
#include "doorManagement\doorManagement.hpp"
#include "doorManagement\ComboLockUI.hpp"

2 - In your compiles.sqf:  ( Mission PBO )  Add the following lines  

/*DoorManagement Zupa*/
DoorGetFriends 		= compile preprocessFileLineNumbers "doorManagement\doorGetFriends.sqf";
DoorNearbyHumans 	= compile preprocessFileLineNumbers "doorManagement\doorNearbyHumans.sqf";
DoorAddFriend 		= compile preprocessFileLineNumbers "doorManagement\doorAddFriend.sqf";
DoorRemoveFriend 	= compile preprocessFileLineNumbers "doorManagement\doorRemoveFriend.sqf";
player_unlockDoor       = compile preprocessFileLineNumbers "doorManagement\player_unlockDoor.sqf";
player_unlockDoorCode = compile preprocessFileLineNumbers "doorManagement\player_unlockDoorCode.sqf";
player_manageDoor       = compile preprocessFileLineNumbers "doorManagement\initDoorManagement.sqf";
player_enterCode       = compile preprocessFileLineNumbers "doorManagement\player_enterCode.sqf";
player_changeCombo = compile preprocessFileLineNumbers "doorManagement\player_changeCombo.sqf"; 
/*DoorManagement End*/
 

Above

BIS_Effects_Burn = compile preprocessFile "\ca\Data\ParticleEffects\SCRIPTS\destruction\burn.sqf";

AND place "//" infront of the normal  player_actions so it looks like this:

// player_unlockDoor   = compile preprocessFileLineNumbers "defaultfile.sqf";   
//player_changeCombo = compile preprocessFileLineNumbers "defaultfike.sqf"; 

3 - Variables.sqf: Add somewhere at the top: NOT FIRST LINE:

/**DoorManagement Config**/
DoorAdminList = ["-2","-3"]; // List of Player Id's of admins that can manage all doors
AllowManualCode = true;// 2 reason| 1: Allows breaking codes (if 2nd config = false and code = 3 digits) | 2: Friends can access access not owned doors until owner gets on.
HarderPenalty = true;// Cen's Penalty: Flashes screen white. And kicks player to lobby if failed more then (random number between 4 and 14) times.
// AllowUncrackableCode = false; // in next release: if set to true, player can change code to more then 4 digits, The manualCode will always fail when he does. THIS is for AntiCodeCrack servers that allow Manual Code for people that like that system.
// in next release. AllowManualCode will allow players to change the code in the DoorManagement Menu.
/**DoorManagement Config END**/
DZE_DoorsLocked = ["Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallDoorLocked_DZ","CinderWallDoorSmallLocked_DZ"];
 

         4 -  FN_SELFACTIONS.SQF:
 
a - Add the following

player removeAction s_player_manageDoor;
s_player_manageDoor = -1; // u might also want to add this to variables reset in your variables.sqf

Under

player removeAction s_player_barkdog;
s_player_barkdog = -1;
player removeAction s_player_warndog;
s_player_warndog = -1;
player removeAction s_player_followdog;
s_player_followdog = -1;

b - Place the following:

//Allow manage door
if((_typeOfCursorTarget in DZE_DoorsLocked)) then {
	if (s_player_manageDoor < 0) then {		 
     s_player_manageDoor = player addAction ["<t color='#0059FF'>Manage Door</t>", "doorManagement\initDoorManagement.sqf", _cursorTarget, 5, false];
	};
} else {
		player removeAction s_player_manageDoor;
		s_player_manageDoor = -1;
};

above

//Allow owner to unlock vault

Now in the Server.pbo
 




5 -  server_monitor.sqf ( Mostly found in dayz_server/system/ if you are not using any modded one).

 

a) place

if (typeOf (_object) in  DZE_DoorsLocked) then {
    _object setVariable ["doorfriends", _intentory, true];
};

under

_object = createVehicle [_type, _pos, [], 0, "CAN_COLLIDE"];

 
B - Find  ( IF NOT USING PLOTMANAGEMENT )




if (count _intentory > 0) then {

Replace that with

 if ((count _intentory > 0) && !(typeOf( _object) in  DZE_DoorsLocked)) then {

B - IF USING PLOT MANAGEMENT, 
 
REplace:

if ((count _intentory > 0) && !(typeOf( _object) == "Plastic_Pole_EP1_DZ")) then {

With

if ((count _intentory > 0) && !(typeOf( _object) == "Plastic_Pole_EP1_DZ") && !(typeOf( _object) in  DZE_DoorsLocked)) then {

6 -  server_UpdateObject.sqf ( Mostly found in dayz_server/compile/ if you are not using any modded one).

 

Change 

_inventory = [
getWeaponCargo _object,
getMagazineCargo _object,
getBackpackCargo _object
];

into ( IF NOT using PLotManagement)
 

_isNormal = true;
if (typeOf (_object)in DZE_DoorsLocked) then{
_isNormal = false;
_inventory = _object getVariable ["doorfriends", []]; //We're replacing the inventory with UIDs for this item
};
if(_isNormal)then {
_inventory = [
getWeaponCargo _object,
getMagazineCargo _object,
getBackpackCargo _object
];
};

IF USING PLOT MANAGEMENT
 
Change

if (typeOf (_object) == "Plastic_Pole_EP1_DZ") then{
    _inventory = _object getVariable ["plotfriends", []]; //We're replacing the inventory with UIDs for this item
} else {
    _inventory = [
    getWeaponCargo _object,
    getMagazineCargo _object,
    getBackpackCargo _object
    ];
}; 

Into

_isNormal = true;
if (typeOf (_object) == "Plastic_Pole_EP1_DZ") then{
    _isNormal = false;
    _inventory = _object getVariable ["plotfriends", []]; //We're replacing the inventory with UIDs for this item
}; 
if (typeOf (_object)in DZE_DoorsLocked) then{
    _isNormal = false;
	_inventory = _object getVariable ["doorfriends", []]; //We're replacing the inventory with UIDs for this item
};

if(_isNormal)then {
    _inventory = [
    getWeaponCargo _object,
    getMagazineCargo _object,
    getBackpackCargo _object
    ];
};

Infistar Antihack
If you're running Infistar Antihack, add this to the dialogs array;




711195, 41144

And this to the '_cMenu =' section

"DoorManagement","Entercode"

IMPORTANT FOR NON PLOT 4 LIFE USERS

 

To add the owner as default to the doors on placement, edit your Player_Upgrade.sqf
 
Locate this:

player reveal _object;
Paste the following code underneath:

_friendUID = getPlayerUID player;
_friendName = name  player;
_friends = [[_friendUID,_friendName]] ; 


_object setVariable ["doorfriends", _friends, true];
PVDZE_veh_Update = [_object,"gear"];
publicVariableServer "PVDZE_veh_Update";
PVDZE_veh_Update call server_updateObject;
This can be cleaned and i'm looking forward to your complete version Zupa :)

 

Share this post


Link to post
Share on other sites

Does this door management use the plot pole friends list? Or is there a manage option on each door. So every Locked door in the plot pole range will open without codes for whoever is in the plot pole freinds list?

Share this post


Link to post
Share on other sites

Every door has it's own list.

 

People only can acces that specifific door where there are added on.

 

That way you can allow certain people in your front garage but not in the main living room ( for example)

Share this post


Link to post
Share on other sites

What happens with all the Locks that are already placed? How does it know that its my ComboLock that i placed before the script was added?

 

Plot4Life, You placed the lock so the OwnerPUID is your PlayerUID.

 

So he see's you are the owner.

Share this post


Link to post
Share on other sites

The NON-plot4life versop, will have a text window where a person can claim ownership of the door by giving in the Old Code. He will be set as Owner (  First in list - Cannot be removed).

 

When the door is claimed, it cannot be claimed anymore.

Share this post


Link to post
Share on other sites

The NON-plot4life versop, will have a text window where a person can claim ownership of the door by giving in the Old Code. He will be set as Owner (  First in list - Cannot be removed).

 

When the door is claimed, it cannot be claimed anymore.

 

Perfect, thanks for the info.

Share this post


Link to post
Share on other sites

Zupa, great idea and concept, but I would REALLY like to see the following before I could add it to my servers:

 

In the dialog allow for the ability to choose between "Eye Scan" and "Enter Code"

 

That way you can still crack locks to get into bases.

Share this post


Link to post
Share on other sites

Zupa, great idea and concept, but I would REALLY like to see the following before I could add it to my servers:

 

In the dialog allow for the ability to choose between "Eye Scan" and "Enter Code"

 

That way you can still crack locks to get into bases.

 

Well i guess i can make 2 versions. 

 

Most servers dont like craccking codes.

 

What penalties u want in failing a code?

 

And do you want to type the code in a text field, or the old dialog?

Share this post


Link to post
Share on other sites

Old dialog would be ideal (combo lock).

 

As far as punishment, this is what I personally use:

titleCut ["","WHITE OUT",1];
			// player scream
			[player,"scream",0,false] call dayz_zombieSpeak;
			[player,20,true,(getPosATL player)] spawn player_alertZombies;
			titleCut ["","WHITE IN",1];
			_display = findDisplay 41144;
			_display closeDisplay 3000;

			if (isNil 'KeyCodeTry') then {KeyCodeTry = 0;};

			KeyCodeTry = KeyCodeTry + 1;

			if (!isNil 'KeyCodeTryTimer') then {KeyCodeTryTimer = diag_tickTime+60;};

			if(KeyCodeTry >= ((round(random 10)) + 4)) then {
			
				if (isNil 'KeyCodeTryTimer') then {KeyCodeTryTimer = diag_tickTime+60;};
			
				cutText [(localize "str_epoch_player_19"), "PLAIN DOWN"];
				_display = findDisplay 46;
				_display closeDisplay 0;
			};

Share this post


Link to post
Share on other sites

 

Old dialog would be ideal (combo lock).

 

As far as punishment, this is what I personally use:

titleCut ["","WHITE OUT",1];
			// player scream
			[player,"scream",0,false] call dayz_zombieSpeak;
			[player,20,true,(getPosATL player)] spawn player_alertZombies;
			titleCut ["","WHITE IN",1];
			_display = findDisplay 41144;
			_display closeDisplay 3000;

			if (isNil 'KeyCodeTry') then {KeyCodeTry = 0;};

			KeyCodeTry = KeyCodeTry + 1;

			if (!isNil 'KeyCodeTryTimer') then {KeyCodeTryTimer = diag_tickTime+60;};

			if(KeyCodeTry >= ((round(random 10)) + 4)) then {
			
				if (isNil 'KeyCodeTryTimer') then {KeyCodeTryTimer = diag_tickTime+60;};
			
				cutText [(localize "str_epoch_player_19"), "PLAIN DOWN"];
				_display = findDisplay 46;
				_display closeDisplay 0;
			};

 

So that closes the dialog every time you fail it.

 

and give the player an epelepsion attack? ^^

 

and attract zeds

 

Then, u can have a random number to 10 ( + 4) attempts , and then it closes soma dialog? dialog 46?

Share this post


Link to post
Share on other sites

Thanks for the mention Zupa.

 

A chance to break in would be good as I have been playing around with the idea of bobby trapping a door with a frag mod :D ....

 

Just as an aside, I am just writing the instructions for my add-on for A Plot for Life which gives a plot owner the option to take ownership of all buildables on the plot (excluding safes, lockboxes, tents and locked doors - all configurable).

 

Meant mainly for people to align their old buildables to the A Plot for Life v2+ system but would also allow raiders to place their own pole and take ownership.

 

If you are using the inventory (wep / mag / backpack) fields then is should work fine.  

Share this post


Link to post
Share on other sites

I'd just like to see enter code so people with the existing codes can enter the door until the owner adds them.

 

Will be in the second version, since it's same what cen request i would say.

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.

Guest
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.

Loading...

  • Similar Content

    • By salival
      Hi guys,
      Quite a few admins asked me to release my Change Code script so here it is, It comes with BattlEye filters, too.
      This will allow players to set the code on placement/upgrade of doors, lockboxes and safes as well as changing them after they are placed.
      https://github.com/oiad/changeCode
    • By Joseph Thompson
      Hello all,
      My name is Joseph. I am looking for active members on Arma 2-Overpoch to join a Team. You must have some knowledge in playing the game and  you must have a working mic (No Echo).
      We will be playing on a server that has recently started up but has big hopes for its self. The staff/Admins are really helpful and have helped to create other servers in the past.
      We will be working together as a team to attend and capture missions also Helping with base building ECT. How you play is entirely up to you if you (this meaning if you want to be a bandit or a hero)
      You must be over the ages of 16 and have a strong sense of humor.
      ------------------------------------------------------------------------------------------------------------------------------------------------
      Please ensure you have one of the following programs:
      ------------------------------------------------------------------------------------------------------------------------------------------------
      Team-speak
      Skype
      Discord
      ------------------------------------------------------------------------------------------------------------------------------------------------
      Please fill in this form if you are interested in joining us.
      ------------------------------------------------------------------------------------------------------------------------------------------------
      Age-
      Name
      SteamName-
      SkypeName-
      DiscordName-
      Playtime-
      And last one: Are you from the UK?-
      ------------------------------------------------------------------------------------------------------------------------------------------------
      If you would like to contact me
      Discord: Joseph_Richards#3973
       
       
    • By unconditional
      Hi everybody,
      scuse me for intrusion :)
      If I did not make mistakes ... maybe I could create a script to unlock the doors through use of the hotwirekit...
      I did not understand how the system of credits on scripts works ... so I want to clarify that my work was based on a script of @salival to which I wrote in private before publishing this. I waited a week but not having received an answer...i think it is still right to make available to the community as much as I did...
      So all the credits go @salival because i am based on his garagedooropener...
      Now...this is my work:
      -1) custom variable.sqf:
      -2) custom fn_selfActions.sqf:
      -3) in custom script folder (under mission folder);
      red text in the script below is needed only if you want to log in .rpt when someone try a hotwiring. If you want this, you have to leave red text in the script and you also have to do step 4
       
      STEP 4 and 5 to do ONLY if you want to see log in .rpt
      -4) in inf.sqf (mission folder);
      -5) in custom script folder (under mission folder);
      - FINISH :-)
      Obviously i think it can be improved and for this reason i make it public, so that those who know more than me can suggest additions or modifications...

      For example ... I added a public variable to know via the .rpt file when a hotwire was used and whether it was successful or not.
      Maybe you can also add a routine to signal in the map or through text message for all the players that someone is trying to force a door...

      I tried it on my server and it seems to work fine.

      I await your observations and suggestions.

      I repeat: ALL CREDITS GO TO @SALIVAL

      Thanks for the attention.
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...