From b06990293397d4b6d0374097f09d1cc5679216e3 Mon Sep 17 00:00:00 2001 From: hybrid Date: Thu, 11 Jun 2026 19:55:04 +0300 Subject: init --- Client/Module/Skill/Skill_Officer.sqf | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Client/Module/Skill/Skill_Officer.sqf (limited to 'Client/Module/Skill/Skill_Officer.sqf') diff --git a/Client/Module/Skill/Skill_Officer.sqf b/Client/Module/Skill/Skill_Officer.sqf new file mode 100644 index 0000000..3048459 --- /dev/null +++ b/Client/Module/Skill/Skill_Officer.sqf @@ -0,0 +1,32 @@ +/* + Script: Officer Skill System by Benny. + Description: Add special skills to the defined officer. +*/ +Private ['_array','_exist','_skip','_tent','_toWorld','_type','_z']; + + +private ["_x","_skip","_array","_toWorld","_tent","_type","_exist"]; +_type = Format ["WFBE_%1FARP",sideJoinedText] Call GetNamespace; +_exist = WF_Logic getVariable Format ["%1MASH",sideJoinedText]; +if !(isNull _exist) then {deleteVehicle _exist}; + +WFBE_SK_V_LastUse_MASH = time; + +_skip = false; +for [{_z = 0},{_z < 7},{_z = _z + 1}] do { + sleep 0.5; + player playMove "AinvPknlMstpSlayWrflDnon_medic"; + sleep 0.5; + waitUntil {animationState player == "ainvpknlmstpslaywrfldnon_amovpknlmstpsraswrfldnon" || !alive player || vehicle player != player}; + if (!alive player || vehicle player != player) exitWith {_skip = true}; +}; + +if (!_skip) then { + _array = [((player worldToModel (getPos player)) select 0),((player worldToModel (getPos player)) select 1) + 10]; + _toWorld = player modelToWorld _array; + _tent = _type createVehicle _toWorld; + WF_Logic setVariable [Format["%1MASH",sideJoinedText],_tent,true]; + _tent addAction ["" + localize 'STR_WF_ACTION_UndeployMASH'+ "", "Client\Module\Skill\Actions\Officer_Undeploy_MASH.sqf", [], 75, false, true, "", "alive _target && time - WFBE_SK_V_LastUse_MASH > 240"]; +} else { + WF_Logic setVariable [Format["%1MASH",sideJoinedText],objNull,true]; +}; \ No newline at end of file -- cgit v1.3.1