Alles anzeigenfür die 4.4 siehts es dann so aus:
fn_restrainAction.sqf
Spoiler anzeigen
#include "..\..\script_macros.hpp"
/*
File: fn_restrainAction.sqf
Author: Bryan "Tonic" BoardwineDescription:
Retrains the target.
*/
private["_unit"];
_unit = cursorTarget;
if(isNull _unit) exitWith {}; //Not valid
if((player distance _unit > 3)) exitWith {};
if((_unit GVAR "restrained")) exitWith {};
if(side _unit == west) exitWith {};
if(player == _unit) exitWith {};
if (side player == civilian) then {
if(license_civ_rebel && playerSide == civilian) exitWith { hint "Du benötigst das Rebellen training um jemanden zu fesseln"; };
if(life_inv_zipties < 2) exitWith { hint "Du hast keine Kabelbinder."; };
life_inv_zipties = life_inv_zipties - 2;
hint "Sie entfuehren einen Zivilisten";
};
if(!isPlayer _unit) exitWith {};
//Broadcast!
_unit SVAR["restrained",true,true];
[player] remoteExec ["life_fnc_restrain",_unit];
[0,"STR_NOTF_Restrained",true,[_unit GVAR["realname", name _unit], profileName]] remoteExecCall ["life_fnc_broadcast",west];inm fn_keyHandler.sqf (Case 19):
Spoiler anzeigen
//Restraining (Shift + R) and Radio (R)
case 19: {
if(_shift) then {_handled = true;};
if(_shift && playerSide == west && {!isNull cursorTarget} && {cursorTarget isKindOf "Man"} && {(isPlayer cursorTarget)} && {(side cursorTarget in [civilian,independent])} && {alive cursorTarget} && {cursorTarget distance player < 3.5} && {!(cursorTarget GVAR "Escorting")} && {!(cursorTarget GVAR "restrained")} && {speed cursorTarget < 1}) then {
[] call life_fnc_restrainAction;
}
else
{
if !(license_civ_rebel) exitWith { hint "Du musst zuerst das Rebellentraining absolvieren um jemanden zu fesseln!"};
if(_shift && playerSide == civilian && {!isNull cursorTarget} && {cursorTarget isKindOf "Man"} && {(currentWeapon player == primaryWeapon player OR currentWeapon player == handgunWeapon player)} && {currentWeapon player != ""} && {(isPlayer cursorTarget)} && {alive cursorTarget} && {cursorTarget distance player < 3.5} && {animationState cursorTarget == "Incapacitated"} && {!(cursorTarget GVAR "Escorting")} && {!(cursorTarget GVAR "restrained")} && {speed cursorTarget < 1}) then
{
if([false,"zipties",2] call life_fnc_handleInv) then
{
[] call life_fnc_restrainAction;
[player,"uncuff"] call life_fnc_globalSound;
hint "Benutze die Action, um weitere Aktionen anzuzeigen";
}
else
{
hint "Du hast keine Kabelbinder dabei!";
};
};
};
};in der Config_vItems.hpp muss das Teil noch reingesetzt werden, damit man es kaufen kann (neue Class unter //Misc).
Spoiler anzeigen
class zipties {
variable = "zipties";
displayName = "STR_Item_Zipties";
weight = 2;
buyPrice = 5000;
sellPrice = 4000;
illegal = false;
edible = -1;
icon = "";
};und in einem beliebiegen Shop einfügen. "zipties"
zum schluss noch in die Stringtable:
<Key ID="STR_Item_Zipties">
<Original>Zipties</Original>
<German>Kabelbinder</German>
</Key>Schon sollte es normal funtzen.
Ich bekomme leider immer die Nachricht "Spyglas sieht dich" hoffe mir kann jemand