Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /** ORIGINAL Author: SchwEde aka shinySonic **/
- /** REWRITED BY juandayz and dedicated for Pillbox and NOVA :D **/
- //Fixes by "a man" and "shawn" tnks guys for the help
- private ["_Message","_ownerID","_hasitem","_vault","_isunlockable","_open","_SetChanceToFail"];
- _vault = _this select 3;
- _isunlockable = (((typeOf _vault) == "VaultStorageLocked") || ((typeOf _vault) == "LockboxStorageLocked"));
- _open= round(random 10);
- _SetChanceToFail = 9;//1 chance to unlock /9 chance to cannot unlock
- _hasitem = "ItemHotwireKit" in magazines player;
- _ownerID = cursorTarget getVariable ["ownerPUID","0"];
- player removeAction s_player_hotwirevault;
- s_player_hotwirevault = -1;
- if (!_hasitem) exitWith {
- localize "STR_NEED_HOTWIRE_KIT" call dayz_rollingMessages;
- };
- dayz_actionInProgress = true;
- player removeMagazine "ItemHotwireKit";
- if (_isunlockable) then {
- if (_open < _SetChanceToFail) exitWith {
- dayz_actionInProgress = false;
- localize "STR_STILL_LOCKED" call dayz_rollingMessages;
- _Message = format ["%1 (%2) IS TRYING TO BREAK INTO A SAFE OR LOCKBOX @ %3 Owner: %4",dayz_playerName,dayz_playerUID,(mapGridPosition getPos player),_ownerID];
- ["CrackSafe_log",_Message,true] call fnc_log;
- };
- localize "STR_UNLOCK_SUCCESS" call dayz_rollingMessages;
- dayz_combination = _vault getVariable["CharacterID","0"];
- _vault spawn player_unlockVault;
- dayz_actionInProgress = false;
- _Message = format ["%1 (%2) HAS BROKEN INTO A SAFE OR LOCKBOX @ %3 Owner: %4",dayz_playerName,dayz_playerUID,(mapGridPosition getPos player),_ownerID];
- ["CrackSafe_log",_Message,true] call fnc_log;
- };
Advertisement
Add Comment
Please, Sign In to add comment