Arma 3 Altis Life vInteractionMenu Probleme

  • * Life

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • Arma 3 Altis Life vInteractionMenu Probleme

    Ich habe versucht ein paar neue vInteraction Actions hinzuzufügen.
    Egal was ich versuche, es werden maximal nur 6 Buttons "benutzt"
    In den Logs steht nichts, habe ich schon geguckt...
    Ich hänge einfach mal meine fn_vInteraction.sqf dran ^^

    Quellcode

    1. #include "..\..\script_macros.hpp"
    2. /*
    3. File: fn_vInteractionMenu.sqf
    4. Author: Bryan "Tonic" Boardwine
    5. Description:
    6. Replaces the mass add actions for various vehicle actions.
    7. */
    8. #define Btn1 37450
    9. #define Btn2 37451
    10. #define Btn3 37452
    11. #define Btn4 37453
    12. #define Btn5 37454
    13. #define Btn6 37455
    14. #define Btn7 37456
    15. #define Title 37401
    16. private ["_display","_curTarget","_Btn1","_Btn2","_Btn3","_Btn4","_Btn5","_Btn6","_Btn7","_id"];
    17. if (!dialog) then {
    18. createDialog "vInteraction_Menu";
    19. };
    20. disableSerialization;
    21. _curTarget = param [0,objNull,[objNull]];
    22. if (isNull _curTarget) exitWith {closeDialog 0;}; //Bad target
    23. _isVehicle = if ((_curTarget isKindOf "landVehicle") || (_curTarget isKindOf "Ship") || (_curTarget isKindOf "Air")) then {true} else {false};
    24. if (!_isVehicle) exitWith {closeDialog 0;};
    25. _display = findDisplay 37400;
    26. _Btn1 = _display displayCtrl Btn1;
    27. _Btn2 = _display displayCtrl Btn2;
    28. _Btn3 = _display displayCtrl Btn3;
    29. _Btn4 = _display displayCtrl Btn4;
    30. _Btn5 = _display displayCtrl Btn5;
    31. _Btn6 = _display displayCtrl Btn6;
    32. _Btn7 = _display displayCtrl Btn7;
    33. life_vInact_curTarget = _curTarget;
    34. _id = getObjectDLC _curTarget;
    35. //Set Repair Action
    36. _Btn1 ctrlSetText localize "STR_vInAct_Repair";
    37. _Btn1 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_repairTruck; closeDialog 0;";
    38. if ((life_inv_toolkit >= 1) && {alive life_vInact_curTarget} && {([life_vInact_curTarget] call life_fnc_isDamaged)}) then {_Btn1 ctrlEnable true;} else {_Btn1 ctrlEnable false;};
    39. if (playerSide isEqualTo west) then {
    40. _Btn2 ctrlSetText localize "STR_vInAct_Registration";
    41. _Btn2 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_searchVehAction; closeDialog 0;";
    42. _Btn3 ctrlSetText localize "STR_vInAct_SearchVehicle";
    43. _Btn3 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_vehInvSearch; closeDialog 0;";
    44. _Btn4 ctrlSetText localize "STR_vInAct_PullOut";
    45. _Btn4 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_pulloutAction; closeDialog 0;";
    46. if (crew _curTarget isEqualTo []) then {_Btn4 ctrlEnable false;};
    47. _Btn5 ctrlSetText localize "STR_vInAct_Impound";
    48. _Btn5 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_impoundAction; closeDialog 0;";
    49. _Btn6 ctrlSetText localize "STR_vInAct_Jaws";
    50. _Btn6 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_jaws; closeDialog 0;";
    51. if (_curTarget isKindOf "Car") then {
    52. _Btn7 ctrlSetText localize "STR_vInAct_PushVehicle";
    53. _Btn7 buttonSetAction "[] spawn life_fnc_pushObject; closeDialog 0;";
    54. if (_curTarget isKindOf "Car" && {local _curTarget} && {crew _curTarget isEqualTo []}) then { _Btn7 ctrlEnable true;} else {_Btn7 ctrlEnable false};
    55. } else {
    56. if (!isNil "_id") then {
    57. if !(_id in getDLCs 1) then {
    58. _Btn7 ctrlSetText localize "STR_vInAct_GetInVehicle";
    59. _Btn7 buttonSetAction "player moveInDriver life_vInact_curTarget; closeDialog 0;";
    60. if (crew _curTarget isEqualTo [] && {canMove _curTarget} && {locked _curTarget isEqualTo 0}) then {_Btn7 ctrlEnable true;} else {_Btn7 ctrlEnable false};
    61. };
    62. } else {
    63. _Btn7 ctrlSetText localize "STR_vInAct_Unflip";
    64. _Btn7 buttonSetAction "life_vInact_curTarget setPos [getPos life_vInact_curTarget select 0, getPos life_vInact_curTarget select 1, (getPos life_vInact_curTarget select 2)+0.5]; closeDialog 0;";
    65. if (alive _curTarget && {crew _curTarget isEqualTo []} && {canMove _curTarget}) then { _Btn7 ctrlEnable false;} else {_Btn7 ctrlEnable true;};
    66. };
    67. };
    68. };
    69. if (playerSide isEqualTo civilian) then {
    70. if (_curTarget isKindOf "Ship") then {
    71. _Btn2 ctrlSetText localize "STR_vInAct_PushBoat";
    72. _Btn2 buttonSetAction "[] spawn life_fnc_pushObject; closeDialog 0;";
    73. if (alive _curTarget && {_curTarget isKindOf "Ship"} && {local _curTarget} && {crew _curTarget isEqualTo []}) then { _Btn2 ctrlEnable true;} else {_Btn2 ctrlEnable false};
    74. } else {
    75. if (!isNil "_id") then {
    76. if !(_id in getDLCs 1) then {
    77. _Btn2 ctrlSetText localize "STR_vInAct_GetInVehicle";
    78. _Btn2 buttonSetAction "player moveInDriver life_vInact_curTarget; closeDialog 0;";
    79. if (crew _curTarget isEqualTo [] && {canMove _curTarget} && {locked _curTarget isEqualTo 0}) then {_Btn2 ctrlEnable true;} else {_Btn2 ctrlEnable false};
    80. };
    81. } else {
    82. _Btn2 ctrlSetText localize "STR_vInAct_Unflip";
    83. _Btn2 buttonSetAction "life_vInact_curTarget setPos [getPos life_vInact_curTarget select 0, getPos life_vInact_curTarget select 1, (getPos life_vInact_curTarget select 2)+0.5]; closeDialog 0;";
    84. if (alive _curTarget && {crew _curTarget isEqualTo []} && {canMove _curTarget}) then { _Btn2 ctrlEnable false;} else {_Btn2 ctrlEnable true;};
    85. };
    86. };
    87. if (typeOf _curTarget == "O_Truck_03_device_F") then {
    88. _Btn3 ctrlSetText localize "STR_vInAct_DeviceMine";
    89. _Btn3 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_deviceMine";
    90. if (!isNil {(_curTarget getVariable "mining")} || !local _curTarget && {_curTarget in life_vehicles}) then {
    91. _Btn3 ctrlEnable false;
    92. } else {
    93. _Btn3 ctrlEnable true;
    94. };
    95. } else {
    96. _Btn3 ctrlShow false;
    97. if (typeOf (_curTarget) in ["C_Van_01_fuel_F","I_Truck_02_fuel_F","B_Truck_01_fuel_F"] && _curTarget in life_vehicles) then {
    98. if (!isNil {_curTarget getVariable "fuelTankWork"}) then {
    99. _Btn3 ctrlSetText localize "STR_FuelTank_Stop";
    100. _Btn3 buttonSetAction "life_vInact_curTarget setVariable [""fuelTankWork"",nil,true]; closeDialog 0;";
    101. _Btn3 ctrlShow true;
    102. } else {
    103. if (count (nearestObjects [_curTarget, ["Land_FuelStation_Feed_F","Land_fs_feed_F"], 15]) > 0) then {
    104. _Btn3 ctrlSetText localize "STR_FuelTank_Supply";
    105. _Btn3 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_fuelSupply";
    106. _Btn3 ctrlShow true;
    107. }else{
    108. {
    109. if (player distance (getMarkerPos _x) < 20) exitWith {
    110. _Btn3 ctrlSetText localize "STR_FuelTank_Store";
    111. _Btn3 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_fuelStore";
    112. _Btn3 ctrlShow true;
    113. };
    114. } forEach ["fuel_storage_1","fuel_storage_2"];
    115. };
    116. };
    117. };
    118. };
    119. _Btn4 ctrlShow false;
    120. _Btn5 ctrlShow false;
    121. _Btn6 ctrlShow false;
    122. _Btn7 ctrlShow false;
    123. };
    124. if (playerSide isEqualTo independent) then {
    125. _Btn2 ctrlSetText localize "STR_vInAct_PullOut";
    126. _Btn2 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_pulloutAction; closeDialog 0;";
    127. if (crew _curTarget isEqualTo []) then {_Btn4 ctrlEnable false;};
    128. _Btn3 ctrlSetText localize "STR_vInAct_Impound";
    129. _Btn3 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_impoundAction; closeDialog 0;";
    130. _Btn5 ctrlSetText localize "STR_vInAct_Jaws";
    131. _Btn5 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_jaws; closeDialog 0;";
    132. if (_curTarget isKindOf "Ship") then {
    133. _Btn6 ctrlSetText localize "STR_vInAct_PushBoat";
    134. _Btn6 buttonSetAction "[] spawn life_fnc_pushObject; closeDialog 0;";
    135. if (_curTarget isKindOf "Ship" && {local _curTarget} && {crew _curTarget isEqualTo []}) then { _Btn6 ctrlEnable true;} else {_Btn6 ctrlEnable false};
    136. } else {
    137. if (!isNil "_id") then {
    138. if !(_id in getDLCs 1) then {
    139. _Btn6 ctrlSetText localize "STR_vInAct_GetInVehicle";
    140. _Btn6 buttonSetAction "player moveInDriver life_vInact_curTarget; closeDialog 0;";
    141. if (crew _curTarget isEqualTo [] && {canMove _curTarget} && {locked _curTarget isEqualTo 0}) then {_Btn6 ctrlEnable true;} else {_Btn6 ctrlEnable false};
    142. };
    143. } else {
    144. _Btn6 ctrlSetText localize "STR_vInAct_Unflip";
    145. _Btn6 buttonSetAction "life_vInact_curTarget setPos [getPos life_vInact_curTarget select 0, getPos life_vInact_curTarget select 1, (getPos life_vInact_curTarget select 2)+0.5]; closeDialog 0;";
    146. if (alive _curTarget && {crew _curTarget isEqualTo []} && {canMove _curTarget}) then { _Btn6 ctrlEnable false;} else {_Btn6 ctrlEnable true;};
    147. };
    148. };
    149. _btn4 ctrlShow false;
    150. };
    Alles anzeigen