Jump to content
Wackbatt

[Release] Zipties | Blindfolds and Gags | 4.4r3+

Recommended Posts

Hello everyone, 

Thought it may be time to write a proper tutorial for my zipties. 

Location of changes: Mission.Map (Eg. AltisLife.Altis or TanoaLife.Tanoa)

Difficulty: Medium

Github: https://github.com/Wackbatt/Altis-Life-Zipties

 

1. Download the files from the github listed above.

2. Navigate to the core folder and drag the zipties folder into it. 

3. Go back to your mission root and open functions.hpp and add the following to the very bottom:

class zipties {
    tag = "zipties";
    class Functions {
        file = "core\zipties";
        class zip_blindfold {};
        class zip_blindfoldAction {};
        class zip_gagPlayer {};
        class zip_gagAction {};
        class zip_interaction {};
        class zip_patDown {};
        class zip_patDownAction {};
        class zip_tie {};
        class zip_tieAction {};
        class zip_untie {};
        class zip_untieFix {};
    };
};

4. Open cfgRemoteExec.hpp and add the following under the client section:

F(zipties_fnc_zip_tie,CLIENT)
F(zipties_fnc_zip_gagplayer,CLIENT)
F(zipties_fnc_zip_blindfold,CLIENT)
F(zipties_fnc_zip_patdown,CLIENT)
F(zipties_fnc_zip_untieFix,CLIENT)

5. Open stringtable.xml and add the following package at the bottom

<Package name="zipties">
  <Key ID="STR_NOTF_ziptied">
      <Original>%1 was ziptied by someone.</Original>
      <German>%1 wurde gefesselt.</German>
  </Key>
  <Key ID="STR_NOTF_unzipteed">
      <Original>%1 was cut loose.</Original>
      <German>%1 wurde befreit.</German>
  </Key>
  <Key ID="STR_ExcessiveTied">
      <Original>You have been released automatically for excessive restrainment time</Original>
      <German>Du wurdest automatisch frei gelassen.</German>
  </Key>
  <Key ID="STR_tied">
      <Original>You have been restrained by someone.</Original>
      <German>Du wurdest gefesselt.</German>
  </Key>
  <Key ID="STR_Ziptie">
      <Original>Ziptie</Original>
      <German>Fesseln</German>
  </Key>
  <Key ID="STR_gag">
      <Original>Gag</Original>
      <German>Knebel</German>
  </Key>
  <Key ID="STR_blindfold">
      <Original>Blindfold</Original>
      <German>Augenbinde</German>
  </Key>
</Package>

6. Open description.ext and add the following:

class ziptie {
    name = "ziptie";
    sound[] = {"\sounds\ziptie.ogg", 1.0, 1};
    titles[] = {};
};

class gag {
    name = "gag";
    sound[] = {"\sounds\gag.ogg", 1.0, 1};
    titles[] = {};
};

6. Add the sounds and icons from the github to the appropriate folders. 

7. Go to the config folder and open Config_master.hpp and add the following in the life settings section:

ziptie_need_rebel = false;

8. Open Config_vItems.hpp and add the following: 

class ziptie {
    variable = "ziptie";
    displayName = "STR_Ziptie";
    weight = 6;
    buyPrice = 5000;
    sellPrice = 1200;
    illegal = true;
    edible = -1;
    icon = "icons\ziptie.paa";
};

class gag {
    variable = "gag";
    displayName = "STR_gag";
    weight = 7;
    buyPrice = 3000;
    sellPrice = 1000;
    illegal = true;
    edible = -1;
    icon = "icons\gag.paa";
};

class blindfold {
    variable = "blindfold";
    displayName = "STR_blindfold";
    weight = 7;
    buyPrice = 3500;
    sellPrice = 1200;
    illegal = true;
    edible = -1;
    icon = "icons\blindfold.paa";
};

9. Open core\actions and replace the 3 files with the files from the git repo.

10. Goto core\functions and open actionkeyhandler and find 

if (playerSide isEqualTo west && {player getVariable ["isEscorting",false]}) exitWith {
    [] call life_fnc_copInteractionMenu;
};

and add the following underneath:

if (playerSide isEqualTo civilian && {player getVariable ["isEscorting",false]}) exitWith {
    [] call zipties_fnc_zip_interaction;
};

and in the same file find

if ((_curObject getVariable ["restrained",false]) && !dialog && playerSide isEqualTo west) then {
    [_curObject] call life_fnc_copInteractionMenu;
};

and add the following underneath: 

if ((_curObject getVariable ["ziptied",true]) && !dialog) then {
    [_curObject] call zipties_fnc_zip_interaction;
};

11. Open keyhandler in the same folder and replace line 24 to 26 with the following: 

if ((_code in (actionKeys "GetOver") || _code in (actionKeys "salute") || _code in (actionKeys "SitDown") || _code in (actionKeys "Throw") || _code in (actionKeys "GetIn") || _code in (actionKeys "GetOut") || _code in (actionKeys "Fire") || _code in (actionKeys "ReloadMagazine") || _code in [16,18]) && ((player getVariable ["restrained",false]) || (player getVariable ["playerSurrender",false]) || (player getVariable ["ziptied",false]) || life_isknocked || life_istazed)) exitWith {
    true;
};

12. Add the following to the if statement for case 21: 

!(player getVariable ["ziptied",false])

and replace case 19 with the following: 

case 19: {
    if (_shift) then {_handled = true;};
    if (_shift && playerSide isEqualTo west && {!isNull cursorObject} && {cursorObject isKindOf "Man"} && {(isPlayer cursorObject)} && {(side cursorObject in [civilian,independent])} && {alive cursorObject} && {cursorObject distance player < 3.5} && {!(cursorObject getVariable "Escorting")} && {!(cursorObject getVariable "restrained")} && {speed cursorObject < 1}) then {
        [] call life_fnc_restrainAction;
    } else {
        [] call zipties_fnc_zip_tieAction;
    };
};

13. Replace the entirety of fn_pullOutVeh.sqf with the file from the github.

14. Open core\medical and open onplayerkilled and add the following underneath the set variables:

[_unit] call zipties_fnc_zip_untieFix;

15. Open core\vehicle and open vinteractionmenu and find 

if (playerSide isEqualTo west) then {

and add the following above it: 

_Btn4 ctrlSetText localize "STR_vInAct_PullOut";
_Btn4 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_pulloutAction; closeDialog 0;";
if (crew _curTarget isEqualTo []) then {_Btn4 ctrlEnable false;};

then remove

 _Btn4 ctrlEnable false;

from around line 127.

16. Open core\init.sqf and find 

player setVariable ["restrained",false,true];
player setVariable ["Escorting",false,true];
player setVariable ["transporting",false,true];
player setVariable ["playerSurrender",false,true];

and add the following underneath: 

player setVariable ["ziptied",false,true];
player setVariable ["blindfolded",false,true];
player setVariable ["gagged",false,true];

17. Repack your pbo and relaunch your server.

Additional Notes: It is up to you to include the 50+ changes to other files in the framework to prevent ziptied people from performing certain actions like gathering, mining etc. I eventually will be making this more stream lined so that these changes are not needed so make sure you keep your files up to date. 

Leave any comments below regarding changes/updates and fixes, feel free to fork the repo and commit any changes you feel need to be made. 

Edited by Wackbatt
  • Like 11

Share this post


Link to post
Share on other sites
2 minutes ago, JimBob0121 said:

my line 19 in keyhandler is _mapKey = (actionKeys "ShowMap" select 0);

It does not mention line 19 anywhere in the tutorial. 

Share this post


Link to post
Share on other sites

Oh na because i download from the github in the winrar it does.

 

This is my line 19 to 21

_interactionKey = if (count (actionKeys "User10") isEqualTo 0) then {219} else {(actionKeys "User10") select 0};
_mapKey = (actionKeys "ShowMap" select 0);
//hint str _code;
_interruptionKeys = [17,30,31,32]; //A,S,W,D

Share this post


Link to post
Share on other sites
2 minutes ago, JimBob0121 said:

Oh na because i download from the github in the winrar it does.

 

This is my line 19 to 21

_interactionKey = if (count (actionKeys "User10") isEqualTo 0) then {219} else {(actionKeys "User10") select 0};
_mapKey = (actionKeys "ShowMap" select 0);
//hint str _code;
_interruptionKeys = [17,30,31,32]; //A,S,W,D

It does not mention line 19 on the github either.

Share this post


Link to post
Share on other sites
Just now, Wackbatt said:

It does not mention line 19 on the github either.

i meant 21 sorry so where would i place the !(player getVariable ["ziptied",false])   

_interactionKey = if (count (actionKeys "User10") isEqualTo 0) then {219} else {(actionKeys "User10") select 0};
_mapKey = (actionKeys "ShowMap" select 0);
//hint str _code;
_interruptionKeys = [17,30,31,32]; //A,S,W,D

Share this post


Link to post
Share on other sites
Just now, JimBob0121 said:

i meant 21 sorry so where would i place the !(player getVariable ["ziptied",false])   

_interactionKey = if (count (actionKeys "User10") isEqualTo 0) then {219} else {(actionKeys "User10") select 0};
_mapKey = (actionKeys "ShowMap" select 0);
//hint str _code;
_interruptionKeys = [17,30,31,32]; //A,S,W,D

In the if statement in case 21.

Share this post


Link to post
Share on other sites

getting this after i fixed the first issue 

This error below has never occurred before until i tried adding this script

Warning Message: File mpmissions\Testy6.Takistan\description.ext, line 173: /CfgFunctions/: Missing '}'
Class Life_RscText destroyed with lock count 9
Class Life_RscStructuredText destroyed with lock count 2
Class Life_RscButtonMenu destroyed with lock count 1
Class Life_RscProgress destroyed with lock count 1

Edited by JimBob0121

Share this post


Link to post
Share on other sites


 

Spoiler
class Socket_Reciever {
    tag = "SOCK";
    class SQL_Socket {
        file = "core\session";
        class dataQuery {};
        class insertPlayerInfo {};
        class requestReceived {};
        class syncData {};
        class updatePartial {};
        class updateRequest {};
    };
};

class Life_Client_Core {
    tag = "life";

    class Master_Directory {
        file = "core";
        class initCiv {};
        class initCop {};
        class initMedic {};
        class setupActions {};
        class setupEVH {};
        class survival {};
        class welcomeNotification {};
    };

    class Actions {
        file = "core\actions";
        class arrestAction {};
        class buyLicense {};
        class captureHideout {};
        class catchFish {};
        class dpFinish {};
        class dropFishingNet {};
        class escortAction {};
        class gather {};
        class getDPMission {};
        class gutAnimal {};
        class healHospital {};
        class impoundAction {};
        class mine {};
        class packupSpikes {};
        class pickupItem {};
        class pickupMoney {};
        class postBail {};
        class processAction {};
        class pulloutAction {};
        class putInCar {};
        class removeContainer {};
        class repairTruck {};
        class restrainAction {};
        class robAction {};
        class searchAction {};
        class searchVehAction {};
        class seizePlayerAction {};
        class serviceChopper {};
        class stopEscorting {};
        class storeVehicle {};
        class surrender {};
        class ticketAction {};
        class unrestrain {};
    };

    class Admin {
        file = "core\admin";
        class adminCompensate {};
        class adminDebugCon {};
        class adminFreeze {};
        class admingetID {};
        class adminGodMode {};
        class adminid {};
        class admininfo {};
        class adminMarkers {};
        class adminMenu {};
        class adminQuery {};
        class adminSpectate {};
        class adminTeleport {};
        class adminTpHere {};
    };

    class Civilian {
        file = "core\civilian";
        class civLoadout {};
        class civMarkers {};
        class demoChargeTimer {};
        class freezePlayer {};
        class jail {};
        class jailMe {};
        class knockedOut {};
        class knockoutAction {};
        class removeLicenses {};
        class robPerson {};
        class robReceive {};
        class tazed {};
    };

    class Config {
        file = "core\config";
        class houseConfig {};
        class itemWeight {};
        class vehicleAnimate {};
        class vehicleWeightCfg {};
    };

    class Cop {
        file = "core\cop";
        class bountyReceive {};
        class containerInvSearch {};
        class copInteractionMenu {};
        class copLights {};
        class copLoadout {};
        class copMarkers {};
        class copSearch {};
        class copSiren {};
        class doorAnimate {};
        class fedCamDisplay {};
        class licenseCheck {};
        class licensesRead {};
        class questionDealer {};
        class radar {};
        class repairDoor {};
        class restrain {};
        class searchClient {};
        class seizeClient {};
        class sirenLights {};
        class spikeStripEffect {};
        class ticketGive {};
        class ticketPaid {};
        class ticketPay {};
        class ticketPrompt {};
        class vehInvSearch {};
        class wantedGrab {};
    };

    class Loadout
	{
		file = "core\cop\loadouts";
		class loadoutMenu {};
		class loadoutPressed {};
	};

    class Dialog_Controls {
        file = "dialog\function";
        class bankDeposit {};
        class bankTransfer {};
        class bankWithdraw {};
        class displayHandler {};
        class gangDeposit {};
        class gangWithdraw {};
        class garageLBChange {};
        class impoundMenu {};
        class progressBar {};
        class safeFix {};
        class safeInventory {};
        class safeOpen {};
        class safeTake {};
        class sellGarage {};
        class setMapPosition {};
        class spawnConfirm {};
        class spawnMenu {};
        class spawnPointCfg {};
        class spawnPointSelected {};
        class unimpound {};
        class vehicleGarage {};
        class wireTransfer {};
    };

    class Functions    {
        file = "core\functions";
        class accType {};
        class actionKeyHandler {};
        class animSync {};
        class calWeightDiff {};
        class clearVehicleAmmo {};
        class dropItems {};
        class escInterupt {};
        class fetchCfgDetails {};
        class fetchDeadGear {};
        class fetchVehInfo {};
        class isDamaged {};
        class giveDiff {};
        class handleDamage {};
        class handleInv {};
        class handleItem {};
        class hideObj {};
        class hudSetup {};
        class hudUpdate {};
        class inventoryClosed {};
        class inventoryOpened {};
        class isUIDActive {};
        class keyHandler {};
        class loadDeadGear {};
        class loadGear {};
        class nearATM {};
        class nearestDoor {};
        class nearUnits {};
        class numberText {};
        class onFired {};
        class onTakeItem {};
        class playerSkins {};
        class playerTags {};
        class pullOutVeh {};
        class pushObject {};
        class receiveItem {};
        class receiveMoney {};
        class revealObjects {};
        class saveGear {};
        class searchPosEmpty {};
        class simDisable {};
        class stripDownPlayer {};
        class tazeSound {};
        class teleport {};
        class whereAmI {};
    };

    class Gangs    {
        file = "core\gangs";
        class createGang {};
        class gangCreated {};
        class gangDisband {};
        class gangDisbanded {};
        class gangInvite {};
        class gangInvitePlayer {};
        class gangKick {};
        class gangLeave {};
        class gangMenu {};
        class gangNewLeader {};
        class gangUpgrade {};
        class initGang {};
    };

    class Housing {
        file = "core\housing";
        class buyHouse {};
        class containerMenu {};
        class copBreakDoor {};
        class copHouseOwner {};
        class garageRefund {};
        class getBuildingPositions {};
        class houseMenu {};
        class initHouses {};
        class lightHouse {};
        class lightHouseAction {};
        class lockHouse {};
        class lockupHouse {};
        class placeContainer {};
        class PlayerInBuilding {};
        class raidHouse {};
        class sellHouse {};
    };

    class Items    {
        file = "core\items";
        class blastingCharge {};
        class boltcutter {};
        class defuseKit {};
        class flashbang {};
        class jerrycanRefuel {};
        class jerryRefuel {};
        class lockpick {};
        class placestorage {};
        class spikeStrip {};
        class storageBox {};
    };

    class Medical_System {
        file = "core\medical";
        class deathScreen {};
        class medicLights {};
        class medicLoadout {};
        class medicMarkers {};
        class medicRequest {};
        class medicSiren {};
        class medicSirenLights {};
        class onPlayerKilled {};
        class onPlayerRespawn {};
        class requestMedic {};
        class respawned {};
        class revived {};
        class revivePlayer {};
    };

    class Network {
        file = "core\functions\network";
        class broadcast {};
        class corpse {};
        class jumpFnc {};
        class say3D {};
        class setFuel {};
        class soundDevice {};
    };

    class Player_Menu {
        file = "core\pmenu";
        class altisPhone {};
        class cellphone {};
        class giveItem {};
        class giveMoney {};
        class keyDrop {};
        class keyGive {};
        class keyMenu {};
        class p_openMenu {};
        class p_updateMenu {};
        class pardon {};
        class removeItem {};
        class s_onChar {};
        class s_onCheckedChange {};
        class s_onSliderChange {};
        class settingsMenu {};
        class updateViewDistance {};
        class useItem {};
        class wantedAddP {};
        class wantedInfo {};
        class wantedList {};
        class wantedMenu {};
    };

    class Shops    {
        file = "core\shops";
        class atmMenu {};
        class buyClothes {};
        class changeClothes {};
        class chopShopMenu {};
        class chopShopSelection {};
        class chopShopSell {};
        class clothingFilter {};
        class clothingMenu {};
        class fuelLBchange {};
        class fuelStatOpen {};
        class vehicleShop3DPreview {};
        class vehicleShopBuy {};
        class vehicleShopEnd3DPreview {};
        class vehicleShopInit3DPreview {};
        class vehicleShopLBChange {};
        class vehicleShopMenu {};
        class virt_buy {};
        class virt_menu {};
        class virt_sell {};
        class virt_update {};
        class weaponShopAccs {};
        class weaponShopBuySell {};
        class weaponShopFilter {};
        class weaponShopMags {};
        class weaponShopMenu {};
        class weaponShopSelection {};
    };

    class Vehicle {
        file = "core\vehicle";
        class vehTakeAllItem {};
		class vehStoreAllItem {};
        class addVehicle2Chain {};
        class colorVehicle {};
        class deviceMine {};
        class FuelRefuelcar {};
        class fuelStore {};
        class fuelSupply {};
        class lockVehicle {};
        class openInventory {};
        class vehiclecolor3DRefresh {};
        class vehicleOwners {};
        class vehicleWeight {};
        class vehInventory {};
        class vehStoreItem {};
        class vehTakeItem {};
        class vInteractionMenu {};
    };

    class zipties {
    tag = "zipties";
    class Functions {
        file = "core\zipties";
        class zip_blindfold {};
        class zip_blindfoldAction {};
        class zip_gagPlayer {};
        class zip_gagAction {};
        class zip_interaction {};
        class zip_patDown {};
        class zip_patDownAction {};
        class zip_tie {};
        class zip_tieAction {};
        class zip_untie {};
        class zip_untieFix {};
    };
};

 

 

 

Edited by JimBob0121

Share this post


Link to post
Share on other sites

2017/04/29,  4:33:26 Warning Message: File mpmissions\__cur_mp.Altis\description.ext, line 225: /CfgFunctions/: Missing '}'

 

Getting this error anyone know?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×