Editing epoch scripts


Thanks but it seems it doesnt need to be edited, i think i found the problem

Code:
//Allow owner to unlock vault
//Enter admins PlaerUID
_dayz_admin = 1234567890;
 
if (_dayz_admin == dayz_playerUID) then {
_admin = dayz_playerUID;
};
 
if((_typeOfCursorTarget == "VaultStorageLocked" or _typeOfCursorTarget == "VaultStorage") and _ownerID != "0" and (player distance _cursorTarget < 3)) then {
if (s_player_unlockvault < 0) then {
if(_typeOfCursorTarget == "VaultStorageLocked") then {
if(_ownerID == dayz_combination or _ownerID == dayz_playerUID or _admin == dayz_playerUID) then {
_combi = player addAction ["Open Safe", "\z\addons\dayz_code\actions\vault_unlock.sqf",_cursorTarget, 0, false, true, "",""];
} else {
_combi = player addAction ["Unlock Safe", "\z\addons\dayz_code\actions\vault_combination_1.sqf",_cursorTarget, 0, false, true, "",""];
};
s_player_combi set [count s_player_combi,_combi];
s_player_unlockvault = 1;
} else {
if(_ownerID != dayz_combination and _ownerID != dayz_playerUID) then {
_combi = player addAction ["Enter Combo", "\z\addons\dayz_code\actions\vault_combination_1.sqf",_cursorTarget, 0, false, true, "",""];
s_player_combi set [count s_player_combi,_combi];
s_player_unlockvault = 1;
};
};
};
} else {
{player removeAction _x} forEach s_player_combi;s_player_combi = [];
s_player_unlockvault = -1;
};

On line
Code:
if(_ownerID == dayz_combination or _ownerID == dayz_playerUID or _admin == dayz_playerUID;) then {
i had an ( ; ) after dayz_playerUID

try the above code, and if that still doesnt work, then this should.
Code:
//Allow owner to unlock vault
//Enter admins PlaerUID
_dayz_admin = 1234567890;
 
if (_dayz_admin == dayz_playerUID) then {
_ownerID = dayz_playerUID;
};
 
if((_typeOfCursorTarget == "VaultStorageLocked" or _typeOfCursorTarget == "VaultStorage") and _ownerID != "0" and (player distance _cursorTarget < 3)) then {
if (s_player_unlockvault < 0) then {
if(_typeOfCursorTarget == "VaultStorageLocked") then {
if(_ownerID == dayz_combination or _ownerID == dayz_playerUID) then {
_combi = player addAction ["Open Safe", "\z\addons\dayz_code\actions\vault_unlock.sqf",_cursorTarget, 0, false, true, "",""];
} else {
_combi = player addAction ["Unlock Safe", "\z\addons\dayz_code\actions\vault_combination_1.sqf",_cursorTarget, 0, false, true, "",""];
};
s_player_combi set [count s_player_combi,_combi];
s_player_unlockvault = 1;
} else {
if(_ownerID != dayz_combination and _ownerID != dayz_playerUID) then {
_combi = player addAction ["Enter Combo", "\z\addons\dayz_code\actions\vault_combination_1.sqf",_cursorTarget, 0, false, true, "",""];
s_player_combi set [count s_player_combi,_combi];
s_player_unlockvault = 1;
};
};
};
} else {
{player removeAction _x} forEach s_player_combi;s_player_combi = [];
s_player_unlockvault = -1;
};
 
fnc_usec_unconscious = {}; // no knockout

fnc_usec_unconscious = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_unconscious.sqf"; // knockout
 
Dopple, pretty much what i have

I have my admin uid's defined in init.sqf
Code:
adminList = ["00000", "000000"];

And I have overidden selfActions

Code:
// Allow Owner to lock and unlock vehicle
if(_isVehicle and _isAlive and !_isMan and _ownerID != "0") then {
    if (s_player_lockUnlock_crtl < 0) then {
        _hasKey = _ownerID in _temp_keys;
        _oldOwner = (_ownerID == dayz_playerUID);
        if(locked _cursorTarget) then {
            if(_hasKey or _oldOwner) then {
                _Unlock = player addAction [format["Unlock %1",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",_cursorTarget, 2, true, true, "", ""];
                s_player_lockunlock set [count s_player_lockunlock,_Unlock];
                s_player_lockUnlock_crtl = 1;
            } else {
                if ((getPlayerUID player) in adminList) then {
                    _Unlock = player addAction [format["<t color='#ff0000'>Unlock %1</t>",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",_cursorTarget, 2, true, true, "", ""];
                } else {
                    _Unlock = player addAction ["<t color='#ff0000'>Vehicle Locked</t>", "",_cursorTarget, 2, true, true, "", ""];
                };
                s_player_lockunlock set [count s_player_lockunlock,_Unlock];
                s_player_lockUnlock_crtl = 1;
            };
        } else {
            if(_hasKey or _oldOwner) then {
                _lock = player addAction [format["Lock %1",_text], "\z\addons\dayz_code\actions\lock_veh.sqf",_cursorTarget, 1, true, true, "", ""];
                s_player_lockunlock set [count s_player_lockunlock,_lock];
                s_player_lockUnlock_crtl = 1;
            } else {
                if ((getPlayerUID player) in adminList) then {
                    _lock = player addAction [format["<t color='#ff0000'>Lock %1</t>",_text], "\z\addons\dayz_code\actions\lock_veh.sqf",_cursorTarget, 1, true, true, "", ""];
                    s_player_lockunlock set [count s_player_lockunlock,_lock];
                    s_player_lockUnlock_crtl = 1;
                };
            };
        };
    };
 
} else {
    {player removeAction _x} forEach s_player_lockunlock;s_player_lockunlock = [];
    s_player_lockUnlock_crtl = -1;
};


I have been looking for a script that I experienced on an Epoch server that eliminates the need for keys in the toolslots and lets the vehicles be locked/unlocked based on the UID of the purchaser. Is that what this script will accomplish ?
 
That script will allow anyone with the UID in the list to scroll on vehicles and unlock/lock it, with a few edits you could get it to allow all players to just scroll to do it instead of needing the keys, but i haven't been working on dayz for a few months now.
 
Hi !
How to use the scripts of this comment please ?
I am blocked in game. I died and I have more my key.

Thanks
 
Back
Top