version 3.0
This commit is contained in:
@@ -1,133 +1,5 @@
|
||||
if (!hasInterface) exitWith {};
|
||||
if ( !hasInterface ) exitWith {};
|
||||
|
||||
waitUntil {player == player};
|
||||
|
||||
|
||||
player createDiarySubject["Status","FBCB2 - Status"];
|
||||
player createDiarySubject["Intel","FBCB2 - Combat Msgs"];
|
||||
player createDiarySubject["Messages","FBCB2 - Messages"];
|
||||
diag_log text "[MILSIM] (initPlayerLocal) diaries created";
|
||||
|
||||
|
||||
waitUntil {time > 0};
|
||||
[] spawn milsim_fnc_initDNI_PlayerFPS;
|
||||
[] spawn milsim_fnc_initPlayerCPS;
|
||||
|
||||
|
||||
_action = [
|
||||
"CheckFuel",
|
||||
"Check Fuel",
|
||||
"",
|
||||
{
|
||||
hint format ["Fuel: %1", (fuel _target *100)]
|
||||
},
|
||||
{true}
|
||||
] call ace_interact_menu_fnc_createAction;
|
||||
["LandVehicle", 0, ["ACE_MainActions"], _action, true] call ace_interact_menu_fnc_addActionToClass;
|
||||
|
||||
|
||||
_action = [
|
||||
"Unfuck",
|
||||
"Flip Vehicle",
|
||||
"",
|
||||
{
|
||||
_target setpos [(getpos _target) select 0,(getpos _target) select 1, 0.5];
|
||||
_target setVectorUp surfaceNormal position _target;
|
||||
},
|
||||
{true}
|
||||
] call ace_interact_menu_fnc_createAction;
|
||||
["LandVehicle", 0, ["ACE_MainActions"], _action, true] call ace_interact_menu_fnc_addActionToClass;
|
||||
|
||||
|
||||
_action = ["CheckExtTank","Check External Tank","",{hint format ["Ext Tank: %1", 5]},{true}] call ace_interact_menu_fnc_createAction;
|
||||
["Tank_F", 0, ["ACE_MainActions", "CheckFuel"], _action, true] call ace_interact_menu_fnc_addActionToClass;
|
||||
|
||||
|
||||
_map_copy_condition = {
|
||||
('ItemMap' in (assignedItems _player)) && ('ItemMap' in (assignedItems _target)) && ([_player, _target, []] call ace_common_fnc_canInteractWith)
|
||||
};
|
||||
|
||||
_map_copy_action = [
|
||||
"MilSimCopyMap",
|
||||
"Copy Map",
|
||||
// "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
|
||||
"\a3\ui_f\data\igui\cfg\actions\talk_ca.paa",
|
||||
{[_target,_player] call milsim_fnc_copyMapFromPlayer},
|
||||
_map_copy_condition
|
||||
] call ace_interact_menu_fnc_createAction;
|
||||
|
||||
["Man", 0, ["ACE_MainActions"], _map_copy_action, true] call ace_interact_menu_fnc_addActionToClass;
|
||||
|
||||
|
||||
_patchTire =
|
||||
[
|
||||
"patchTire",
|
||||
"Patch Tire",
|
||||
"\a3\ui_f\data\IGUI\Cfg\Actions\repair_ca.paa",
|
||||
{
|
||||
[_player, "AinvPknlMstpSnonWnonDr_medic5", 0] call ace_common_fnc_doAnimation;
|
||||
|
||||
[
|
||||
30,
|
||||
[_player, _target],
|
||||
{
|
||||
params ["_args"];
|
||||
_args params ["_player", "_target"];
|
||||
hint "Tire Patched";
|
||||
_target setDamage 0.2;
|
||||
_target setVariable["milsim_ace_repair_wheel_canPatch", false];
|
||||
},
|
||||
{
|
||||
params ["_args"];
|
||||
_args params ["_player", "_target"];
|
||||
hint "Stopped repair";
|
||||
[_player, "", 0] call ace_common_fnc_doAnimation;
|
||||
},
|
||||
"Patching"
|
||||
] call ace_common_fnc_progressBar
|
||||
},
|
||||
{ ( alive _target ) && ( [_player, "ToolKit"] call ace_common_fnc_hasItem ) && ( getDammage _target > 0.2 ) && ( _target getVariable["milsim_ace_repair_wheel_canPatch", true] ) }
|
||||
] call ace_interact_menu_fnc_createAction;
|
||||
|
||||
|
||||
["ACE_Wheel", 0, ["ACE_MainActions"], _patchTire, true] call ace_interact_menu_fnc_addActionToClass;
|
||||
|
||||
|
||||
player addEventHandler["Respawn",
|
||||
{
|
||||
params ["_unit", "_corpse"];
|
||||
_killer = _corpse getVariable ["ace_medical_causeOfDeath", "#scripted"];
|
||||
if (_killer == "respawn_button") then {
|
||||
format["[MILSIM] (initPlayerLocal) %1 was unconscious then clicked the respawn button", name _unit] remoteExec["diag_log", 0];
|
||||
// format["%1 was unconscious then clicked the respawn button", name _unit] remoteExec["systemChat", 0];
|
||||
};
|
||||
}];
|
||||
|
||||
|
||||
[{
|
||||
params ["_unit", "_object", "_cost"];
|
||||
private _return = (count nearestObjects [_unit, ["B_APC_Tracked_01_CRV_F", "rhsusf_M1239_M2_Deploy_socom_d", "rhsusf_stryker_m1132_m2_wd", "rhsusf_m113_usarmy_supply", "rhsusf_M1078A1P2_B_WD_CP_fmtv_usarmy", "B_Slingload_01_Cargo_F"], 120]) > 0;
|
||||
_return
|
||||
}] call ace_fortify_fnc_addDeployHandler;
|
||||
|
||||
addMissionEventHandler ["HandleChatMessage", {
|
||||
params ["_channel", "_owner", "_from", "_text", "_person", "_name", "_strID", "_forcedDisplay", "_isPlayerMessage", "_sentenceType", "_chatMessageType"];
|
||||
|
||||
if ( missionNamespace getVariable ["milsim_sideChat", false] ) exitWith{ false };
|
||||
|
||||
if (_channel != 1) exitWith { false };
|
||||
|
||||
if ( ( admin _owner ) != 0 ) exitWith { false };
|
||||
|
||||
if ( !isNull ( getAssignedCuratorLogic _person ) ) exitWith { false };
|
||||
|
||||
true;
|
||||
}];
|
||||
|
||||
|
||||
waitUntil {!isNil "milsim_complete"};
|
||||
[] spawn milsim_fnc_initFBCB2;
|
||||
|
||||
|
||||
// Initializes the player/client side Dynamic Groups framework and registers the player group
|
||||
["InitializePlayer", [player, true]] call BIS_fnc_dynamicGroups;
|
||||
|
||||
nil;
|
||||
Reference in New Issue
Block a user