fn_selfactions

mootactics

New Member
for some odd reason i just can't figure out why it keeps multiplying my options for unlocking a vehicle..

Can someone please view this over and see what I may or May not be messing up here? or any recommendations for changes?

My host is through Vilayer, Running Overpoch with Epoch 1.0.5.1 & OverWatch 0.2.5
I execute this sqf through init.sqf using this line (Which is a custom path, and does execute it. )
Code:
fnc_usec_selfActions = compile preprocessFileLineNumbers "Scripts\fn_selfActions.sqf";

fn_selfactions.sqf
 
lock/unlock section is missing a line
Code:
 s_player_lockunlock set [count s_player_lockunlock,_Unlock];

it should look like this

// Allow Owner to lock && unlock vehicle
if(_player_lockUnlock_crtl) then {
if (s_player_lockUnlock_crtl < 0) then {
_hasKey = _ownerID in _temp_keys;
_oldOwner = (_ownerID == dayz_playerUID);
if(locked _cursorTarget) then {
if(_hasKey || _oldOwner) then {
_Unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_UNLOCK",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",[_cursorTarget,(_temp_keys_names select (parseNumber _ownerID))], 2, true, true, "", ""];
s_player_lockunlock set [count s_player_lockunlock,_Unlock];
s_player_lockUnlock_crtl = 1;
} else {
if(_hasHotwireKit) then {
_Unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_HOTWIRE",_text], "\z\addons\dayz_code\actions\hotwire_veh.sqf",_cursorTarget, 2, true, true, "", ""];
} else {
_Unlock = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_VEHLOCKED"], "",_cursorTarget, 2, true, true, "", ""];
};
s_player_lockunlock set [count s_player_lockunlock,_Unlock];
s_player_lockUnlock_crtl = 1;
};
} else {
if(_hasKey || _oldOwner) then {
_lock = player addAction [format[localize "STR_EPOCH_ACTIONS_LOCK",_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} count s_player_lockunlock;s_player_lockunlock = [];
s_player_lockUnlock_crtl = -1;
};
 
Awesome, and when i have the show plot boundary enabled it makes the plot pole options visible for a good while when away for it, then once the maintain area and preview maintain area disappear the Show Plot Boundary remains, any idea for that?
here's the area its located for fn_selfactions
Code:
    // logic vars
    _player_flipveh = false;
    _player_deleteBuild = false;
    _player_lockUnlock_crtl = false;

    if (_canDo && (speed player <= 1) && (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ")) then {
        if (s_player_maintain_area < 0) then {
            s_player_maintain_area = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_MAINTAREA"], "\z\addons\dayz_code\actions\maintain_area.sqf", "maintain", 5, false];
            s_player_maintain_area_preview = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_MAINTPREV"], "\z\addons\dayz_code\actions\maintain_area.sqf", "preview", 5, false];
s_player_plot_boundary = player addAction ["Show plot boundary", "\z\addons\dayz_code\compile\object_showPlotRadius.sqf", "", 1, false];
        };
    } else {
            player removeAction s_player_maintain_area;
            s_player_maintain_area = -1;
            player removeAction s_player_maintain_area_preview;
            s_player_maintain_area_preview = -1;
player removeAction s_player_plot_boundary;
s_player_plot_boundary = -1;
    };
 
try making it its own function like so
Code:
if (_canDo && (speed player <= 1) && (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ")) then {
   if (s_player_plot_boundary < 0) then {
    s_player_plot_boundary = player addAction ["Show plot boundary", "\z\addons\dayz_code\compile\object_showPlotRadius.sqf", "", 1, false];
   };
} else {
  player removeAction s_player_plot_boundary;
  s_player_plot_boundary = -1;
};
 
well the plot thing is working great, but now take clothes is doing the crap where if im away from the dead body, it stays on the scroll wheel for about 15 seconds..
After i replaced the plot boundary thing everything is working fine, so that was the source of the errors for the lock it seems..

Edit

just found what was wrong with study body, everything is working perfect now.

Thanks for your help!
 
Last edited:
well the plot thing is working great, but now take clothes is doing the crap where if im away from the dead body, it stays on the scroll wheel for about 15 seconds..
After i replaced the plot boundary thing everything is working fine, so that was the source of the errors for the lock it seems..

Edit

just found what was wrong with study body, everything is working perfect now.

Thanks for your help!
no probs :)
 
Back
Top