version 3.0
This commit is contained in:
67
functions/client/fn_bindVehicleActions.sqf
Normal file
67
functions/client/fn_bindVehicleActions.sqf
Normal file
@@ -0,0 +1,67 @@
|
||||
if ( !hasInterface ) exitWith {};
|
||||
|
||||
_checkFuel =
|
||||
[
|
||||
"CheckFuel",
|
||||
"Check Fuel",
|
||||
"",
|
||||
{
|
||||
hint format ["Fuel: %1%2", floor (fuel _target *100), "%"];
|
||||
},
|
||||
{true}
|
||||
] call ace_interact_menu_fnc_createAction;
|
||||
|
||||
["LandVehicle", 0, ["ACE_MainActions"], _checkFuel, true] call ace_interact_menu_fnc_addActionToClass;
|
||||
|
||||
|
||||
_unflip =
|
||||
[
|
||||
"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"], _unflip, 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;
|
||||
|
||||
|
||||
diag_log text "[MILSIM] (client) vehicle actions bound";
|
||||
|
||||
nil;
|
||||
Reference in New Issue
Block a user