Das muss in den actionKeyHandler. Jedoch habe ich noch mehr umgeändert. Zum Beispiel haben Polizisten einmal ein interaktions Menü wenn der Zivi gefesselt ist und einmal wenn er nicht gefesselt ist. Auch ein paar andere sachen wurden noch angepasst. Das musst du dann gegebenfalls umändern.
Code: fn_actionKeyHandler.sqf
//If target is a player then check if we can use the cop menu.
if(isPlayer _curTarget && _curTarget isKindOf "Man") then {
if(!dialog && playerSide == west) then {
if((_curTarget GVAR ["restrained",false]) && !dialog) then {
[_curTarget] call life_fnc_copInteractionMenu;
} else {
[_curTarget] call life_fnc_copInteractionMenu2;
};
};
if(!dialog && playerSide == independent) then {
[_curTarget] call life_fnc_medInteractionMenu;
};
if((_curTarget GVAR ["restrained",false]) && !dialog && playerSide == civilian) then {
[_curTarget] call life_fnc_zivInteractionMenu;
};
} else {
//OK, it wasn't a player so what is it?
private["_isVehicle","_miscItems","_money","_list"];
_list = ["landVehicle","Ship","Air"];
_isVehicle = if(KINDOF_ARRAY(_curTarget,_list)) then {true} else {false};
_miscItems = ["Land_BottlePlastic_V1_F","Land_TacticalBacon_F","Land_Can_V3_F","Land_CanisterFuel_F","Land_Suitcase_F"];
_animalTypes = ["Salema_F","Ornate_random_F","Mackerel_F","Tuna_F","Mullet_F","CatShark_F","Turtle_F"];
_money = "Land_Money_F";
//It's a vehicle! open the vehicle interaction key!
if(_isVehicle) then {
if(!dialog) then {
if(player distance _curTarget < SEL(SEL(boundingBox _curTarget,1),0)+2) then {
[_curTarget] call life_fnc_vInteractionMenu;
};
};
} else {
//Is it a animal type?
if((typeOf _curTarget) in _animalTypes) then {
if(EQUAL((typeOf _curTarget),"Turtle_F") && !alive _curTarget) then {
private "_handle";
_handle = [_curTarget] spawn life_fnc_catchTurtle;
waitUntil {scriptDone _handle};
} else {
private "_handle";
_handle = [_curTarget] spawn life_fnc_catchFish;
waitUntil {scriptDone _handle};
};
} else {
//OK, it wasn't a vehicle so let's see what else it could be?
if((typeOf _curTarget) in _miscItems) then {
[_curTarget,player,false] remoteExecCall ["TON_fnc_pickupAction",RSERV];
} else {
//It wasn't a misc item so is it money?
if(EQUAL((typeOf _curTarget),_money) && {!(_curTarget GVAR ["inUse",false])}) then {
[_curTarget,player,true] remoteExecCall ["TON_fnc_pickupAction",RSERV];
};
};
};
};
};
Alles anzeigen