Hey leute ich habe ein problem mit der VInteractionMenu
Error im Rpt
Spoiler anzeigen
Code: RPT Log
16:12:39 Error in expression <e_fnc_impoundAction;";
if (!_curTarget {!dialog} && {!life_action_inUse} && {!(>
16:12:39 Error position: <{!dialog} && {!life_action_inUse} && {!(>
16:12:39 Error Missing )
16:12:39 File core\vehicle\fn_vInteractionMenu.sqf [life_fnc_vInteractionMenu], line 154
16:12:39 Error in expression <e_fnc_impoundAction;";
if (!_curTarget {!dialog} && {!life_action_inUse} && {!(>
16:12:39 Error position: <{!dialog} && {!life_action_inUse} && {!(>
16:12:39 Error Missing )
16:12:39 File core\vehicle\fn_vInteractionMenu.sqf [life_fnc_vInteractionMenu], line 154
Alles anzeigen
Die Datei
Spoiler anzeigen
Code: fn_vInteractionMenu.sqf
#include "..\..\script_macros.hpp"
/*
Author: DerOnkel & Williams edit by Deathman
Description:
Vehicle Interaction Menu
*/
private["_curTarget","_isVehicle","_display","_btn1","_btn2","_btn3","_btn4","_btn5","_btn6","_btn7","_btn8","_btn9","_btn10"];
disableSerialization;
_curTarget = param [0,ObjNull,[ObjNull]];
_damage = 0;
{
if(_x > 0.34) then
{
_damage = _damage + _x;
};
} forEach ((getAllHitPointsDamage _curTarget) # 2);
if(isNull _curTarget) exitWith {closeDialog 0;};
_isVehicle = if((_curTarget isKindOf "landVehicle") OR (_curTarget isKindOf "Ship") OR (_curTarget isKindOf "Air")) then {true} else {false};
if(!_isVehicle) exitWith {closeDialog 0;};
if(!dialog) then
{
switch (playerside) do
{
case west: {createDialog "vInteraction_Menu_8";};
case independent: {createDialog "vInteraction_Menu_7";};
case civilian: {createDialog "vInteraction_Menu_7";};
};
};
_display = findDisplay 37400;
_background = _display displayCtrl 37401;
_background ctrlsetFade 0;
_background ctrlcommit 5;
_btn1 = _display displayCtrl 37450;
_btn2 = _display displayCtrl 37451;
_btn3 = _display displayCtrl 37452;
_btn4 = _display displayCtrl 37453;
_btn5 = _display displayCtrl 37454;
_btn6 = _display displayCtrl 37455;
_btn7 = _display displayCtrl 37456;
_btn8 = _display displayCtrl 37457;
life_vInact_curTarget = _curTarget;
switch (playerside) do
{
case west:
{
_Btn1 ctrlShow false;
_Btn2 ctrlShow false;
_Btn3 ctrlShow false;
_Btn4 ctrlShow false;
_Btn5 ctrlShow false;
_Btn6 ctrlShow false;
_Btn7 ctrlShow false;
_Btn8 ctrlShow false;
_btn1 ctrlSetText "textures\interaction\Vehicle\icon_close.paa";
_btn1 ctrlSetTooltip "Menü Schließen";
_btn1 buttonSetAction "closeDialog 0;";
if(_damage > 0) then
{
_btn2 ctrlSetText "textures\interaction\Vehicle\icon_repair.paa";
_btn2 ctrlSetTooltip "Reparieren";
_btn2 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_repairTruck;";
_btn2 ctrlEnable false;
if ((life_inv_toolkit >= 1) && {alive life_vInact_curTarget} && {([life_vInact_curTarget] call life_fnc_isDamaged)}) then {_Btn2 ctrlEnable true;} else {_Btn2 ctrlEnable false;};
} else {
_btn2 ctrlSetText "textures\interaction\Vehicle\icon_repair.paa";
_btn2 ctrlSetTooltip "Reparieren";
_btn2 ctrlEnable false;
};
_btn3 ctrlSetText "textures\interaction\Vehicle\icon_push.paa";
_btn3 ctrlSetTooltip "Schieben";
_btn3 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_pushObject;";
if(_curTarget isKindOf "Ship" && {local _curTarget} && {count crew _curTarget == 0}) then { _Btn3 ctrlEnable true;} else {_Btn3 ctrlEnable false};
_btn4 ctrlSetText "textures\interaction\Vehicle\icon_register.paa";
_btn4 ctrlSetTooltip "Besitzer Abfrage";
_btn4 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_searchVehAction;";
_btn5 ctrlSetText "textures\interaction\Vehicle\icon_search.paa";
_btn5 ctrlSetTooltip "Durchsuchen";
_btn5 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_vehInvSearch;";
_btn6 ctrlSetText "textures\interaction\Vehicle\icon_pullout.paa";
_btn6 ctrlSetTooltip "Herausziehen";
_btn6 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_pulloutAction;";
if(count crew _curTarget == 0) then {_Btn6 ctrlEnable false;};
_btn7 ctrlSetText "textures\interaction\Vehicle\icon_impound.paa";
_btn7 ctrlSetTooltip "Beschlagnahmen";
_btn7 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_impoundAction;";
if (!_curTarget {!dialog} && {!life_action_inUse} && {!(player getVariable ["playerSurrender",false])} && {!(player getVariable ["restrained",false])} && {!life_isknocked} && {!life_istazed}) then
{
_btn8 ctrlSetText "textures\interaction\Vehicle\icon_trunk.paa";
_btn8 ctrlSetTooltip "Kofferraum";
_btn8 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_openInventory";
_btn8 ctrlEnable true;
} else {
_btn8 ctrlSetTooltip "Kofferaum";
_btn8 ctrlSetText "textures\interaction\Vehicle\icon_trunk.paa";
_btn8 ctrlEnable false;
};
{
_x ctrlSetFade 0;
_x ctrlCommit 3;
_x ctrlShow true;
} forEach [_Btn1,_Btn2,_Btn3,_Btn4,_Btn5,_Btn6,_Btn7,_Btn8];
};
case independent:
{
_Btn1 ctrlShow false;
_Btn2 ctrlShow false;
_Btn3 ctrlShow false;
_Btn4 ctrlShow false;
_Btn5 ctrlShow false;
_Btn6 ctrlShow false;
_Btn7 ctrlShow false;
_btn1 ctrlSetText "textures\interaction\Vehicle\icon_close.paa";
_btn1 ctrlSetTooltip "Menü Schließen";
_btn1 buttonSetAction "closeDialog 0;";
if(_damage > 0) then
{
_btn2 ctrlSetText "textures\interaction\Vehicle\icon_repair.paa";
_btn2 ctrlSetTooltip "Reparieren";
_btn2 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_repairTruck;";
_btn2 ctrlEnable false;
if ((life_inv_toolkit >= 1) && {alive life_vInact_curTarget} && {([life_vInact_curTarget] call life_fnc_isDamaged)}) then {_Btn2 ctrlEnable true;} else {_Btn2 ctrlEnable false;};
} else {
_btn2 ctrlSetText "textures\interaction\Vehicle\icon_repair.paa";
_btn2 ctrlSetTooltip "Reparieren";
_btn2 ctrlEnable false;
};
_btn3 ctrlSetText "textures\interaction\Vehicle\icon_push.paa";
_btn3 ctrlSetTooltip "Schieben";
_btn3 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_pushObject;";
if(_curTarget isKindOf "Ship" && {local _curTarget} && {count crew _curTarget == 0}) then { _Btn3 ctrlEnable true;} else {_Btn3 ctrlEnable false};
_btn4 ctrlSetText "textures\interaction\Vehicle\icon_pullout.paa";
_btn4 ctrlSetTooltip "Herausziehen";
_btn4 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_pulloutAction;";
if(count crew _curTarget == 0) then {_Btn6 ctrlEnable false;};
_btn5 ctrlSetText "textures\interaction\Vehicle\icon_unflip.paa";
_btn5 ctrlSetTooltip "Unflip";
_btn5 buttonSetAction "closeDialog 0; life_vInact_curTarget setPos [getPos life_vInact_curTarget select 0, getPos life_vInact_curTarget select 1, (getPos life_vInact_curTarget select 2)+0.5];";
if(count crew _curTarget == 0 && {canMove _curTarget}) then { _Btn5 ctrlEnable false;} else {_Btn5 ctrlEnable true;};
_btn6 ctrlSetText "textures\interaction\Vehicle\icon_impound.paa";
_btn6 ctrlSetTooltip "Beschlagnahmen";
_btn6 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_impoundAction;";
if (!_curTarget {!dialog} && {!life_action_inUse} && {!(player getVariable ["playerSurrender",false])} && {!(player getVariable ["restrained",false])} && {!life_isknocked} && {!life_istazed}) then
{
_btn7 ctrlSetText "textures\interaction\Vehicle\icon_trunk.paa";
_btn7 ctrlSetTooltip "Kofferraum";
_btn7 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_openInventory";
_btn7 ctrlEnable true;
} else {
_btn7 ctrlSetTooltip "Kofferaum";
_btn7 ctrlSetText "textures\interaction\Vehicle\icon_trunk.paa";
_btn7 ctrlEnable false;
};
{
_x ctrlSetFade 0;
_x ctrlCommit 3;
_x ctrlShow true;
} forEach [_Btn1,_Btn2,_Btn3,_Btn4,_Btn5,_Btn6, _Btn7];
};
case civilian:
{
_Btn1 ctrlShow false;
_Btn2 ctrlShow false;
_Btn3 ctrlShow false;
_Btn4 ctrlShow false;
_Btn5 ctrlShow false;
_Btn6 ctrlShow false;
_Btn7 ctrlShow false;
_btn1 ctrlSetText "textures\interaction\Vehicle\icon_close.paa";
_btn1 ctrlSetTooltip "Menü Schließen";
_btn1 buttonSetAction "closeDialog 0;";
if(_damage > 0) then
{
_btn2 ctrlSetText "textures\interaction\Vehicle\icon_repair.paa";
_btn2 ctrlSetTooltip "Reparieren";
_btn2 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_repairTruck;";
_btn2 ctrlEnable false;
if ((life_inv_toolkit >= 1) && {alive life_vInact_curTarget} && {([life_vInact_curTarget] call life_fnc_isDamaged)}) then {_Btn2 ctrlEnable true;} else {_Btn2 ctrlEnable false;};
} else {
_btn2 ctrlSetText "textures\interaction\Vehicle\icon_repair.paa";
_btn2 ctrlSetTooltip "Reparieren";
_btn2 ctrlEnable false;
};
_btn3 ctrlSetText "textures\interaction\Vehicle\icon_push.paa";
_btn3 ctrlSetTooltip "Schieben";
_btn3 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_pushObject;";
if(_curTarget isKindOf "Ship" && {local _curTarget} && {count crew _curTarget == 0}) then { _Btn3 ctrlEnable true;} else {_Btn3 ctrlEnable false};
_btn4 ctrlSetText "textures\interaction\Vehicle\icon_unflip.paa";
_btn4 ctrlSetTooltip "Unflip";
_btn4 buttonSetAction "closeDialog 0; life_vInact_curTarget setPos [getPos life_vInact_curTarget select 0, getPos life_vInact_curTarget select 1, (getPos life_vInact_curTarget select 2)+0.5];";
if(count crew _curTarget == 0 && {canMove _curTarget}) then { _Btn4 ctrlEnable false;} else {_Btn4 ctrlEnable true;};
if (!_curTarget {!dialog} && {!life_action_inUse} && {!(player getVariable ["playerSurrender",false])} && {!(player getVariable ["restrained",false])} && {!life_isknocked} && {!life_istazed}) then
{
_btn5 ctrlSetText "textures\interaction\Vehicle\icon_trunk.paa";
_btn5 ctrlSetTooltip "Kofferraum";
_btn5 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_openInventory;";
_btn5 ctrlEnable true;
} else {
_btn5 ctrlSetTooltip "Kofferaum";
_btn5 ctrlSetText "textures\interaction\Vehicle\icon_trunk.paa";
_btn5 ctrlEnable false;
};
if(_curTarget isKindOf "O_Truck_03_device_F") then
{
_btn6 ctrlSetText "textures\interaction\Vehicle\icon_mining.paa";
_btn6 ctrlSetTooltip "Abbau Starten";
_btn6 buttonSetAction "closedialog 0; [life_vInact_curTarget] spawn life_fnc_deviceMine;";
if(!isNil {(_curTarget getVariable "mining")} OR !local _curTarget && {_curTarget in life_vehicles}) then {
_Btn6 ctrlEnable false;
} else {
_Btn6 ctrlEnable true;
};
} else {
_btn6 ctrlSetText "textures\interaction\Vehicle\icon_mining.paa";
_btn6 ctrlSetTooltip "Abbau Starten";
_btn6 ctrlEnable false;
};
if(license_civ_rebel) then
{
_Btn7 ctrlSetText "textures\interaction\Vehicle\icon_pullout.paa";
_Btn7 ctrlSetTooltip "Herausziehen";
_Btn7 buttonSetAction "closeDialog 0; [life_vInact_curTarget] spawn life_fnc_pulloutAction;";
if(count crew _curTarget == 0) then {_Btn4 ctrlEnable false;};
} else{
_Btn7 ctrlShow false;
};
{
_x ctrlSetFade 0;
_x ctrlCommit 3;
_x ctrlShow true;
} forEach [_Btn1,_Btn2,_Btn3,_Btn4,_Btn5,_Btn6,_Btn7];
};
};
Alles anzeigen
Ich bedanke mich schonmal im Voraus