[Release] BaseBuilding 1.2 Improvements 0.1 (better and editable Keycode, permanent Owner)

kikyou2

Valued Member!
Hi there,

as I stated in my project thread I will now release the complete code of my working BaseBuilding 1.2 improvements. I can't say how far this will work on other mods, please backup your files and try it out, I can say that its fully working with DayZ Epoch Mod!

Features of this improvement:
-Objects are now tied to your PlayerUID which is generated by CD Key, you will not lose ownership if you die
-the Keycode which is given after you build something is now exact 4 digits long and is a random number which is reliable and will work after restart even if the object shift!
-as owner you're able to edit your Code anytime to an own 4 digits long code and this code is also reliable and will work after restart even if the object shift ;)
-Admin: Remove Button works for everything (tied to PlayerUID)
-Admin: Can enter any Code and it will be valid (tied to PlayerUID)

So you will now have full control over the things you crafted. Please remember that this Improvements require that a working version of Basebuilding 1.2 is already installed.

How you install everything

For DayZ Epoch Users:
1. Download my complete package
2. Put files of dayz_1.world into your unpacked PBO file at \MPMissions\DayZ_Epoch_11.Chernarus and overwrite files (you need to unpbo the file with a programm like PboManager)
3. Put files of dayz_server into your \@DayZ_Epoch_Server\addons\dayz_server\server.pbo you need to unpack and repack this thing (use PboManager again for example)
4.Now you just have to add at the top of the description.ext (there maybe already other includes, there is the right place)
Code:
#include "defines2.hpp"
5. Have fun with the improvements!

For every other mod you have to merge (untested):

I will try to write down here every change I made that you can do it for your own. Follow it exactly and it might work, I don't promise anything! I also tried to comment everything that is understandable for you what I did there.

Extract your server.pbo and your mission.pbo. We will need both!

We start with server.pbo

/dayz_server/server_publishObject.sqf

Merge the first line with this line

Code:
private ["_class","_uid","_charID","_object","_worldspace","_key","_code","_fuel"];

Below this
Code:
_class =_this select 3;

Add this
Code:
_fuel = _this select 4;
_code = _this select 5; //added to pick up the code which we passed from player_build.sqf

Change this
Code:
_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _charID, _worldspace, [], [], 0,_uid];

to this
Code:
_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _charID, _worldspace, [], [], _fuel,_uid];

Below this
Code:
_key call server_hiveWrite;

Add this
Code:
//_code = _fuel * 1000; //would be only necessary if we wouldn't pass the code from player_build.sqf
_object setVariable ["Code", _code,true]; //set the Code to the Object
_object setVariable ["ObjectUID", _uid,true]; //set ObjectUID to the Object
_object setVariable ["Classname", _class,true]; //set Classname to the Object

-------------------------------------------------------------------------------------------
/dayz_server/server_monitor.sqf

Instead of this
Code:
if ((_object isKindOf "Static") && !(_object isKindOf "TentStorage")) then {
_object setpos [(getposATL _object select 0),(getposATL _object select 1), 0];
};
//Set Variable
if (_object isKindOf "Infostand_2_EP1" && !(_object isKindOf "Infostand_1_EP1")) then {
_object setVariable ["ObjectUID", _worldspace call dayz_objectUID2, true];
_object enableSimulation false;
};

Add this
Code:
//the following is happening on every server restart
_code = _fuel * 1000; //it is necessary cause we get only the converted fuel variable from the database, so we got to calculate back to code format
_object setVariable ["Code", _code,true]; //set Code to the Object
_object setVariable ["Classname", _type,true]; //set Classname to the Object
_object setVariable ["ObjectID", _idKey,true]; //set ObjectID to the Object
_object setVariable ["ObjectUID", _worldspace call dayz_objectUID2, true]; //set ObjectUID to the Object
if ((_object isKindOf "Static") && !(_object isKindOf "TentStorage")) then {
_object setpos [(getposATL _object select 0),(getposATL _object select 1), 0];
};
//Set Variable
if (_object isKindOf "Infostand_2_EP1" && !(_object isKindOf "Infostand_1_EP1")) then {
_object setVariable ["Code", _code, true]; //changed to _code instead of _worldspace call dayz_objectUID2
};

-------------------------------------------------------------------------------------------

Now we're ready to start with mission.pbo

You should be simply able to just download my missionpbo.rar and unpack it to your mission file. Overwrite everything it asks for(if it doesn't ask for overwriting you definetly done something wrong!).

Now you just have to add at the top of the description.ext (there maybe already other includes, there is the right place)

Code:
#include "defines2.hpp"


I included my Admin remove with the green button and my Admin Override for the purple "Enter Code.." and "Operate Gates" that every Code will work for Admins.

To get green remove button working for every buildable you have to edit ADMINPLAYERUID to the PlayerUID of your Admin at the player_remove.sqf

To get the Admin Override working for every buildable you have to edit ADMINPLAYERUID to the PlayerUID of your Admin at the codeCompare.sqf

Remember that after every "ADMINPLAYERUID" it has to be a comma, except the last one.

If you don't know how to get your PlayerUID:

Arma2 MainMenu>>Profile>>"PlayerName">>Edit, look in the bottom left hand corner for "Player ID" that is the number that needs to be added to the code


Have fun!

It have cost me many hours to get this working and I hope you'll all like it!

If you want to support me and my projects you can make donations, thanks for every single one!!



Don't be cruel its my first project :D

Greetings

kikyou2
 
If you have modified some of the files on your own I will write you what I changed from normal Basebuilding. (check all posts out)

This shouldn't be needed for normal user! You did this already above!

Create new file "defines2.hpp"
Code:
class KeypadGateNew {
idd = -1;
movingEnable = false;
controlsBackground[] = {};
controls[] = {
"B1",
"B2",
"B3",
"B4",
"B5",
"B6",
"B7",
"B8",
"B9",
"B0",
"BEnter",
"BAbort",
"KeypadImage",
"NumberDisplay"
};
objects[] = {};
class B1 {
idc = -1;
type = 1;
style = 2;
moving = false;
x = 0.39;
y = 0.39;
h = 0.08;
w = 0.06;
font = "Zeppelin32";
sizeEx = 0.05;
// action uses script commands to close dialog and display a hint
action = "CODEINPUT set [count CODEINPUT, 1]; ctrlSetText [1099, str CODEINPUT];";
text = "";
default = false;
colorText[] = {0,0,0,1}; // white
colorFocused[] = {0.1,0.1,0.1,0.1}; // green
colorShadow[] = {0,0,0,0}; // darkgrey
colorBorder[] = {0.5,0.5,0.5,0}; // grey
colorBackground[] = {0.7,0.7,0.7,1};
colorBackgroundActive[] = {0.1,0.1,0.1,0.3}; // green
colorDisabled[] = {1,0,0,1}; // red
colorBackgroundDisabled[] = {0.5,0.5,0.5,0}; // grey
borderSize = 0.015;
offsetX = 0.005;
offsetY = 0.005;
offsetPressedX = 0.002;
offsetPressedY = 0.002;
soundEnter[] = {"",0,1}; // NoSound
soundPush[] = {"",0,1}; // NoSound
soundClick[] = {"\dayz_sfx\action\cell\dtmf_1.ogg",0.5,1}; // NoSound
soundEscape[] = {"",0,1}; // NoSound
};
 
class B2 : B1 {
x = 0.47;
text = "";
soundClick[] = {"\dayz_sfx\action\cell\dtmf_2.ogg",0.5,1};
action = "CODEINPUT set [count CODEINPUT, 2]; ctrlSetText [1099, str CODEINPUT];";
};
class B3 : B1 {
x = 0.55;
text = "";
soundClick[] = {"\dayz_sfx\action\cell\dtmf_3.ogg",0.5,1};
action = "CODEINPUT set [count CODEINPUT, 3]; ctrlSetText [1099, str CODEINPUT];";
};
class B4 : B1 {
y = 0.50;
text = "";
soundClick[] = {"\dayz_sfx\action\cell\dtmf_4.ogg",0.5,1};
action = "CODEINPUT set [count CODEINPUT, 4]; ctrlSetText [1099, str CODEINPUT];";
};
class B5 : B4 {
x = 0.47;
text = "";
soundClick[] = {"\dayz_sfx\action\cell\dtmf_5.ogg",0.5,1};
action = "CODEINPUT set [count CODEINPUT, 5]; ctrlSetText [1099, str CODEINPUT];";
};
class B6 : B4 {
x = 0.55;
text = "";
soundClick[] = {"\dayz_sfx\action\cell\dtmf_6.ogg",0.5,1};
action = "CODEINPUT set [count CODEINPUT, 6]; ctrlSetText [1099, str CODEINPUT];";
};
class B7 : B1 {
y = 0.61;
text = "";
soundClick[] = {"\dayz_sfx\action\cell\dtmf_7.ogg",0.5,1};
action = "CODEINPUT set [count CODEINPUT, 7]; ctrlSetText [1099, str CODEINPUT];";
};
class B8 : B7 {
x = 0.47;
text = "";
soundClick[] = {"\dayz_sfx\action\cell\dtmf_8.ogg",0.5,1};
action = "CODEINPUT set [count CODEINPUT, 8]; ctrlSetText [1099, str CODEINPUT];";
};
class B9 : B7 {
x = 0.55;
text = "";
soundClick[] = {"\dayz_sfx\action\cell\dtmf_9.ogg",0.5,1};
action = "CODEINPUT set [count CODEINPUT, 9]; ctrlSetText [1099, str CODEINPUT];";
};
 
class B0 : B8 {
y = 0.72;
text = "";
soundClick[] = {"\dayz_sfx\action\cell\dtmf_0.ogg",0.5,1};
action = "CODEINPUT set [count CODEINPUT, 0]; ctrlSetText [1099, str CODEINPUT];";
};
class BEnter : B9 {
y = 0.72;
text = "";
soundClick[] = {"\dayz_sfx\action\cell\dtmf_hash.ogg",0.6,1};
action = "closeDialog 0; nul = [CODEINPUT] execVM 'dayz_code\external\keypad\fnc_keyPad\codeCheck.sqf';";
};
class BAbort : B7 {
y = 0.72;
text = "";
soundClick[] = {"\dayz_sfx\action\cell\dtmf_star.ogg",0.6,1};
action = "closeDialog 0; CODEINPUT = [];";
};
class KeypadImage {
idc = -1;
type = CT_STATIC;
style = ST_PICTURE;
colorText[] = { };
colorBackground[] = { };
font = "Zeppelin32";
sizeEx = 0.023;
x = 0.35; y = 0.2;
w = 0.3; h = 0.8;
text = "dayz_code\external\keypad\pics\keypad.paa";
};
class NumberDisplay {
idc = 1099;
type = CT_STATIC ; // defined constant
style = ST_LEFT; // defined constant
colorText[] = { 1, 0, 0, 1 };
colorBackground[] = { 1, 1, 1, 0 };
font = Zeppelin32; // defined constant
sizeEx = 0.028;
x = 0.38; y = 0.24;
w = 0.23; h = 0.1;
text = "";
};
};

-------------------------------------------------------------------------------------------

Open description.ext and add nearly the top of the script
Code:
#include "defines2.hpp"

-------------------------------------------------------------------------------------------

Open \mission\dayz_code\actions\player_remove.sqf
Directly below this
Code:
if ( _ownerID == dayz_characterID ) then {
call _func_ownerRemove;
};

Add this
Code:
if ( _ownerID == dayz_playerUID ) then {
call _func_ownerRemove;
};
// ------------------------------------------------------------------------kikyou2 Panel Admin Override Start---------------------------------------------------------------------
if ((getPlayerUID player) in ["ADMINPLAYERUID1","ADMINPLAYERUID2"]) then {
call _func_ownerRemove;
};
// ------------------------------------------------------------------------kikyou2 Panel Admin Overide End------------------------------------------------------------------------

-------------------------------------------------------------------------------------------

Open \mission\dayz_code\actions\fn_selfActions.sqf

Directly below this
Code:
// Disarm Booby Trap Action
if(_hasToolbox && _canDo && !remProc && !procBuild && (cursortarget iskindof "Grave" && cursortarget distance player < 2.5 && !(cursortarget iskindof "Body" || cursortarget iskindof "GraveCross1" || cursortarget iskindof "GraveCross2" || cursortarget iskindof "GraveCrossHelmet" || cursortarget iskindof "Land_Church_tomb_1" || cursortarget iskindof "Land_Church_tomb_2" || cursortarget iskindof "Land_Church_tomb_3" || cursortarget iskindof "Mass_grave"))) then {
if (s_player_disarmBomb < 0) then {
s_player_disarmBomb = player addaction [("<t color=""#F01313"">" + ("Disarm Bomb") +"</t>"),"dayz_code\actions\player_disarmBomb.sqf","",1,true,true,"", ""];
};
} else {
player removeAction s_player_disarmBomb;
s_player_disarmBomb = -1;
};

Add this
Code:
// ------------------------------------------------------------------------kikyou2 Edit Button Start---------------------------------------------------------------------
if((typeOf(cursortarget) in allbuildables_class) && _canDo && !procBuild && !remProc && (_ownerID == dayz_playerUID)) then {
if (true) then {
if (s_player_codeEdit < 0) then {
s_player_codeEdit = player addaction [("<t color=""#00ffff"">" + ("Edit Code") +"</t>"),"dayz_code\external\keypad\fnc_keyPad\editCode.sqf"];
};
} else {
player removeAction s_player_codeEdit;
s_player_codeEdit = -1;
};
} else {
player removeAction s_player_codeEdit;
s_player_codeEdit = -1;
};
// ------------------------------------------------------------------------kikyou2 Edit Button End-----------------------------------------------------------------------

Also directly below this
Code:
// ### BASE BUILDING 1.2 ### Add in these:
// ### START ###
player removeAction s_player_codeRemove;
s_player_codeRemove = -1;
player removeAction s_player_forceSave;
s_player_forceSave = -1;
player removeAction s_player_disarmBomb;
s_player_disarmBomb = -1;
player removeAction s_player_codeObject;
s_player_codeObject = -1;
player removeAction s_player_enterCode;
s_player_enterCode = -1;
player removeAction s_player_smeltRecipes;
s_player_smeltRecipes = -1;
player removeAction s_player_smeltItems;
s_player_smeltItems = -1;

Add this
Code:
// ------------------------------------------------------------------------kikyou2 Edit Button Start---------------------------------------------------------------------
player removeAction s_player_codeEdit;
s_player_codeEdit = -1;
// ------------------------------------------------------------------------kikyou2 Edit Button End-----------------------------------------------------------------------

-------------------------------------------------------------------------------------------

Look for post 3
 
Open \mission\dayz_code\compile\player_build.sqf
Directly below this
Code:
} forEach _location;
_uid = _uid + str(round(_dir));
Add this
Code:
// ------------------------------------------------------------------------kikyou2 Random Keycode Start---------------------------------------------------------------------
_coder = random(9999); //generating random number between 0-9999
if (_coder < 1000) then { //checks whether the number is < 1000
_coder = _coder + 1000; //adds 1000 to the number if its < 1000 to make sure that the code will be 4 digits long
};
_code = round _coder; //remove all digits after comma
 
// ------------------------------------------------------------------------kikyou2 Random Keycode End-----------------------------------------------------------------------
Change also this
Code:
cutText [format["You have constructed a %1, REMEMBER THIS PERMANENT KEYCODE: %2 .  Make sure to build 2 (one in/one out) Key Panels as soon as possible to get both codes!",_text,_uid], "PLAIN DOWN",60];
To this
Code:
cutText [format["You have constructed a %1, REMEMBER THIS PERMANENT KEYCODE: %2 .  Make sure to build 2 (one in/one out) Key Panels as soon as possible to get both codes!",_text,_code], "PLAIN DOWN",60];
And this
Code:
cutText [format["You have constructed a %1\n Keycode for object removal: %2 .\n",_text,uid], "PLAIN DOWN",60]
To this
Code:
cutText [format["You have constructed a %1\n Keycode for object removal: %2 .\n",_text,_code], "PLAIN DOWN",60]
Additionally change this
Code:
// Send to database
_object setVariable ["characterID",dayz_characterID,true];
dayzPublishObj = [dayz_characterID,_object,[_dir,_location],_classname];
publicVariableServer "dayzPublishObj";
if (isServer) then {
dayzPublishObj call server_publishObj;
};
} else {cutText ["You need the EXACT amount of whatever you are trying to build without extras.", "PLAIN DOWN"];call _funcExitScript;};
To this
Code:
// Send to database
_fuel = _code / 1000; //added to calculate valid fuel value for the database
_object setVariable ["characterID",dayz_playerUID,true];
dayzPublishObj = [dayz_playerUID,_object,[_dir,_location],_classname,_fuel,_code]; //added _code to pass to the publishObj function to prevent calculation errors
publicVariableServer "dayzPublishObj";
if (isServer) then {
dayzPublishObj call server_publishObj;
};
} else {cutText ["You need the EXACT amount of whatever you are trying to build without extras.", "PLAIN DOWN"];call _funcExitScript;};
-------------------------------------------------------------------------------------------
Replace \mission\dayz_code\external\keypad\fnc_keyPad\CodeCompare.sqf
with this
Code:
private ["_isPanel","_validObject","_validObjectCode","_panelPos","_playerPos","_cnt","_gateAccess","_inVehicle","_soundSource","_panel","_convertInput","_code", "_inputCode", "_validMatch", "_stringinput","_numberinputr","_coder"];
_panel = cursortarget;
_gateAccess = false;
_playerPos = getpos player;
_panelPos = getpos _panel;
_cnt = 600;
_validMatch = false;
_validObjectCode = false;
keyCode = _this select 0;
//hint format["keycode after enter: %1", keyCode];
sleep 3;
_code = keyCode;
_inputCode = _this select 1;
//hint format["Keycode: %1 | CodeInput: %2", _code, _inputCode];
_convertInput =+ _inputCode;
for "_i" from 0 to (count _convertInput - 1) do {_convertInput set [_i, (_convertInput select _i) + 48]};
//hint format["Keycode: %1 | CodeInput: %2", _code, (toString _convertInput)];
_numberinput = parseNumber((tostring _convertInput));
// compare arrays to see if code matches
if (typeOf(_panel) == "Infostand_2_EP1") then {
_validMatch = [_code, _numberinput] call BIS_fnc_areEqual;
} else {
_validObjectCode = [_code, _numberinput] call BIS_fnc_areEqual;
};
 
// ------------------------------------------------------------------------kikyou2 Panel Admin Override Start---------------------------------------------------------------------
// Server Owner Overide Code
if ((getPlayerUID player) in ["ADMINPLAYERUID1","ADMINPLAYERUID2"]) then { //making possible that every Player with ones of these UIDs can enter any Code and it will be valid
        if (typeOf(_panel) == "Infostand_2_EP1") then {
            _validMatch = true;
        } else {
            _validObjectCode = true;
        };
    };
// ------------------------------------------------------------------------kikyou2 Panel Admin Overide End------------------------------------------------------------------------
if (_validMatch) then {
cutText ["### ACCESS GRANTED ###", "PLAIN DOWN"];
playsound "beep";
sleep 0.5;
playsound "beep";
sleep 0.5;
playsound "beep";
keyValid = true;
_gateAccess = true;
sleep 2;
cutText ["You can now operate the bases gate panel(s) for 60 seconds", "PLAIN DOWN"];
while {_gateAccess} do 
{
_playerPos = getpos player;
_panelPos = getpos _panel;
//_inVehicle = (vehicle player != player);
if (_playerPos distance _panelPos > 150) then {
_gateAccess = false;
keyValid = false;
cutText ["Lost connection to panel > 150 meters away", "PLAIN DOWN"];
};
_cnt = _cnt - 1;
if (_cnt <= 600 && _cnt % 10 == 0) then {
cutText [format["Access to panel expires in %1 seconds",(_cnt / 10)], "PLAIN DOWN",1];
};
if (_cnt <= 0) then {
_gateAccess = false;
keyValid = false;
cutText ["You no longer have gate access, type code in again to have access", "PLAIN DOWN"];
};
sleep .1;
};
keyValid = false;
} else {
if (!_validObjectCode) then {
removeObject = false;
cutText ["!!! ACCESS DENIED !!!", "PLAIN DOWN"];
playsound "beep";
sleep 2;
cutText ["Wrong code was entered", "PLAIN DOWN"];
} else {
removeObject = true;
//_validObject setVariable ["validObject",true];
_panel setVariable ["validObject", true];
cutText ["### ACCESS GRANTED ###\n You can now delete object", "PLAIN DOWN"];
playsound "beep";
sleep 0.5;
playsound "beep";
sleep 0.5;
playsound "beep";
_gateAccess = true;
while {_gateAccess} do 
{
_playerPos = getpos player;
_panelPos = getpos _panel;
//_inVehicle = (vehicle player != player);
if (_playerPos distance _panelPos > 5) then {
_gateAccess = false;
cutText ["Object access lost, player > 5 meters away", "PLAIN DOWN"];
};
_cnt = _cnt - 1;
if (_cnt <= 600 && _cnt % 10 == 0) then {
cutText [format["Access to object expires in %1 seconds",(_cnt / 10)], "PLAIN DOWN",1];
};
if (_cnt <= 0) then {
_gateAccess = false;
cutText ["You no longer have object access, type code in again to have access", "PLAIN DOWN"];
};
sleep .1;
};
removeObject = false;
};
};
CODEINPUT = [];
-------------------------------------------------------------------------------------------
Look for post 4
 
Replace \mission\dayz_code\external\keypad\fnc_keyPad\enterCode.sqf
with this
Code:
//addaction sends [target, caller, ID, (arguments)]
private ["_displayok","_lever"];
//_id = _this select 2;
//_lever removeAction _id;
_lever = cursortarget;
//_dir = direction _lever;
//_pos = getPosATL _lever;
//_uid = [_dir,_pos] call dayz_objectUID2;
keyCode = _lever getVariable ["Code","0"]; //changed to "Code" instead of "ObjectUID" to ensure that it gets the right value
_displayok = createdialog "KeypadGate";
-------------------------------------------------------------------------------------------
Create \mission\dayz_code\external\keypad\fnc_keyPad\codeCheck.sqf
with this code inside
Code:
private ["_object","_location","_dir","_worldspace","_objectID","_objectUID","_classname","_codeinput","_convertInput","_i","_stringInput","_numberInput","_fuel"];
_object = cursortarget; //get object
_location = getposATL _object; //get location of object
_dir = getDir _object; //get direction of object
_worldspace = [_dir,_location]; //generate worldspace like in db with direction and location
_objectID = _object getVariable["ObjectID","0"]; //get ObjectID
_objectUID = _object getVariable["ObjectUID","0"]; //get ObjectUID
_classname = _object getVariable["Classname","0"]; //get Classname
//_objectUID = _worldspace call dayz_objectUID2;; //alternative method to get worldspace, not recommended
_codeinput = _this select 0; //get input from keypanel
sleep 3; //some time to make sure its safed
_convertInput =+ _codeinput; //converts the input to positive
for "_i" from 0 to (count _convertInput - 1) do {_convertInput set [_i, (_convertInput select _i) + 48]}; //converts the array to an array that is able to convert to a string
_numberInput = parseNumber (toString _convertInput); //convert to a string and directly convert to number
if ( _numberInput > 1000 && _numberInput < 10000) then { //checks whether the input number has 4 digits
dayzDeleteObj = [_objectID,_objectUID]; //prepare global array to pass variables to the delete function
publicVariableServer "dayzDeleteObj";
if (isServer) then {
dayzDeleteObj call server_deleteObj; //delete the object in the database to be able to recreate it
};
sleep 3; //wait some time to ensure everything is deleted
_fuel = _numberInput / 1000; //calculate fuel to make it ready for database
_object setVariable ["Code",_numberInput,true]; //set the code again to be sure its set to the object
_object setVariable ["characterID",dayz_playerUID,true]; //set the playerUID again to be sure its set to the object
dayzPublishObj = [dayz_playerUID,_object,[_dir,_location],_classname,_fuel,_numberInput]; //prepare global array to pass variables to the publish function
publicVariableServer "dayzPublishObj";
if (isServer) then {
dayzPublishObj call server_publishObj; //recreate the database entry with the new code stored in the fuel field
};
_object setVariable ["Code",_numberInput,true]; //set the code again to be sure its set to the object
cutText [format["You have successfully changed your code to: %1",(toString _convertInput)], "PLAIN DOWN",1]; //give positive response to player and put the code out to it can be rechecked
playsound "beep"; //only sound response
sleep 0.5;
playsound "beep";
sleep 0.5;
playsound "beep";
}
else { cutText ["Failed to change your code, please use exact 4 numbers!", "PLAIN DOWN"];breakOut "exit"; //if the number wasn't valid it will end the script and you can try it again
_codeinput = []; //empty the array for safety
};
 
_codeinput = []; //empty the array for safety
-------------------------------------------------------------------------------------------
Create \mission\dayz_code\external\keypad\fnc_keyPad\editCode.sqf
with this code inside
Code:
//addaction sends [target, caller, ID, (arguments)]
private ["_displayok2","_lever2"];
//_id = _this select 2;
//_lever removeAction _id;
_lever2 = cursortarget; //get object
//_dir = direction _lever;
//_pos = getPosATL _lever;
//_uid = [_dir,_pos] call dayz_objectUID2;
_displayok2 = createdialog "KeypadGateNew"; //start Keypad ingame

Everything ready :D
 
Back
Top