Jump to content

Search the Community

Showing results for tags 'zip ties'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Altis Life RPG
    • Headquarters
    • Introductions
    • RULES
  • Altis Life RPG Community
    • General Discussion
    • Helper Recruitment
    • Altis Life Server Advertising
    • Discord (join us for discuss)
  • Tools and Administration
    • Altis Life RPG (official Framework)
    • Altis Life Wiki
    • Server Setup and Configuration
    • Database
    • Security
    • Maintenance
  • Altis Life Customization
    • Server & Scripting Help Desk
    • Releases & Download
    • Misc & Tools
  • Kool Kids Klub's Oof
  • Kool Kids Klub's Secret Spot

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


CPU


Memory


Hard Drive


Graphic Card


PSU


Case


Monitor


Description - Other Accessories

Found 1 result

  1. jmuirhead

    [Tutorial] Zip Ties

    Hi, after some doing i was able to make a Zip Tie script PLEASE READ THIS. This script was made for my server, i decided to release it anyways. It is provided as is, and wont be updated anymore. You can currently Ziptie civs not cops, anyone can pull people out of vehicles. You will have to script this to your server needs. If you dont know how your going to have to learn. If I ever update this script i will be rewriting everything. Feel free to update it on your own, but remember to share with the community. Difficulty: Medium Author: jmuirhead(With some help from AlaskaVet) This is my first tutorial, let me know what needs change or if im missing anything. Also thanks to AlaskaVet for helping me with a large portion of it! 1. Open your functions.hpp and in the civilian class add the following. class civInteractionMenu {}; It should look something like this: class Civilian { file = "core\civilian"; class jailMe {}; class civMarkers {}; class jail {}; class tazed {}; class knockedOut {}; class knockoutAction {}; class robReceive {}; class robPerson {}; class removeLicenses {}; class demoChargeTimer {}; class civLoadout {}; class freezePlayer {}; class civInteractionMenu {}; class civStripGuns {}; }; 2. Now we're going to add a new item. Open the Config_vItems.hpp and add class zipties { variable = "zipties"; displayName = "STR_Item_ZipTies"; weight = 0; buyPrice = 1200; sellPrice = -1; illegal = true; edible = -1; icon = "icons\ziptie.paa"; }; at the bottom. 3. Open up stringtable.xml and add: <Key ID="STR_Item_ZipTies"> <Original>ZipTies</Original> </Key> 3. Go to the /core/functions/ and open fn_keyHandler.sqf 4. Add case 48: { //The number, 48, is the key that has to be pressed in order to zip tie someone currently "b" if(_shift) then {_handled = true;}; //This makes it so they have to hold shift + key(48) to work. if(playerSide in [west,independent]) exitWith {};//Makes it so police and EMS cant zip tie people if !(license_civ_rebel) exitWith { hintSilent "You need a rebel training!"; };//Add required license's. Remove the whole line if you dont want any checks if(_shift && playerSide == civilian && !isNull cursorTarget && cursorTarget isKindOf "Man" && (isPlayer cursorTarget) && (side cursorTarget in [civilian,east]) && alive cursorTarget && cursorTarget distance player < 3.5 && !(cursorTarget getVariable "Escorting") && !(cursorTarget getVariable "restrained") && speed cursorTarget < 1) then { if([false,"zipties",1] call life_fnc_handleInv) then//Removes the zipties from the inventory { [] call life_fnc_RestrainAction; hintSilent "You have cuffed him! "; } else { hintSilent "You don't have zipties"; }; }; }; 5. Go to /core/civilian/ create a new file. Name it: fn_civInteractionMenu.sqf #include "..\..\script_macros.hpp" /* File: fn_civInteractionMenu.sqf Author: jmuirhead(help from AlaskaVet) Description: Replaces the mass addactions for various cop actions towards another player. */ #define Btn1 37450 #define Btn2 37451 #define Btn3 37452 #define Btn4 37453 #define Btn5 37454 #define Btn6 37455 #define Btn7 37456 #define Btn8 37457 #define Btn9 37458 #define Title 37401 private["_display","_curTarget","_seizeRank","_Btn1","_Btn2","_Btn3","_Btn4","_Btn5","_Btn6","_Btn7","_Btn9"]; disableSerialization; _curTarget = param [0,ObjNull,[ObjNull]]; if(isNull _curTarget) exitWith {closeDialog 0;}; //Bad target if(!dialog) then { createDialog "pInteraction_Menu"; }; if(!isPlayer _curTarget && side _curTarget == civilian) exitWith {closeDialog 0;}; //Bad side check? if(player distance _curTarget > 5 ) exitWith {closeDialog 0;}; // Prevents menu accessing from far distances. _display = findDisplay 37400; _Btn1 = _display displayCtrl Btn1; _Btn2 = _display displayCtrl Btn2; _Btn3 = _display displayCtrl Btn3; _Btn4 = _display displayCtrl Btn4; _Btn5 = _display displayCtrl Btn5; _Btn6 = _display displayCtrl Btn6; _Btn7 = _display displayCtrl Btn7; _Btn9 = _display displayCtrl Btn9; life_pInact_curTarget = _curTarget; //Set Unrestrain Button _Btn1 ctrlSetText localize "STR_pInAct_Unrestrain"; _Btn1 buttonSetAction "[life_pInact_curTarget] call life_fnc_unrestrain; closeDialog 0;"; //Set Escort Button _Btn2 ctrlSetText localize "STR_pInAct_Escort"; _Btn2 buttonSetAction "[life_pInact_curTarget] call life_fnc_escortAction; closeDialog 0;"; _Btn3 ctrlSetText localize "STR_pInAct_StopEscort"; _Btn3 buttonSetAction "[life_pInact_curTarget] call life_fnc_stopEscorting; [life_pInact_curTarget] call life_fnc_civInteractionMenu;"; _Btn4 ctrlSetText localize "STR_pInAct_PutInCar"; _Btn4 buttonSetAction "[life_pInact_curTarget] call life_fnc_putInCar;"; 6. Now go to your /core/actions/ and open fn_restrainAction and replace it with this code #include "..\..\script_macros.hpp" /* File: fn_restrainAction.sqf Author: Bryan "Tonic" Boardwine Description: Retrains the target. */ private["_unit"]; _unit = cursorObject; if(isNull _unit) exitWith {}; //Not valid if((player distance _unit > 3)) exitWith {}; if((_unit getVariable "restrained")) exitWith {}; if(side _unit isEqualTo west) exitWith {}; if(player isEqualTo _unit) exitWith {}; if (side player isEqualTo civilian) then { if(life_inv_zipties < 1) exitWith { hintSilent "You dont have any zipties"; }; life_inv_zipties = life_inv_zipties - 1; hintSilent "You have ziptied him"; }; if(!isPlayer _unit) exitWith {}; //Broadcast! _unit setVariable["restrained",true,true]; [player] remoteExec ["life_fnc_restrain",_unit]; [0,"STR_NOTF_Restrained",true,[_unit getVariable["realname", name _unit], profileName]] remoteExecCall ["life_fnc_broadcast",west]; 7. Go to your /core/vehicle/ and open fn_vInteractionMenu.sqf and replace the code with #include "..\..\script_macros.hpp" /* File: fn_vInteractionMenu.sqf Author: Bryan "Tonic" Boardwine Description: Replaces the mass addactions for various vehicle actions */ #define Btn1 37450 #define Btn2 37451 #define Btn3 37452 #define Btn4 37453 #define Btn5 37454 #define Btn6 37455 #define Title 37401 private["_display","_curTarget","_Btn1","_Btn2","_Btn3","_Btn4","_Btn5","_Btn6","_dlcVehicles"]; if(!dialog) then { createDialog "vInteraction_Menu"; }; disableSerialization; _curTarget = param [0,ObjNull,[ObjNull]]; if(isNull _curTarget) exitWith {closeDialog 0;}; //Bad target _isVehicle = if((_curTarget isKindOf "landVehicle") OR (_curTarget isKindOf "Ship") OR (_curTarget isKindOf "Air")) then {true} else {false}; if(!_isVehicle) exitWith {closeDialog 0;}; _display = findDisplay 37400; _Btn1 = _display displayCtrl Btn1; _Btn2 = _display displayCtrl Btn2; _Btn3 = _display displayCtrl Btn3; _Btn4 = _display displayCtrl Btn4; _Btn5 = _display displayCtrl Btn5; _Btn6 = _display displayCtrl Btn6; life_vInact_curTarget = _curTarget; _dlcVehicles = ["C_Kart_01_Blu_F","C_Kart_01_Red_F","C_Kart_01_Fuel_F","C_Kart_01_Vrana_F","B_Heli_Transport_03_F","B_Heli_Transport_03_unarmed_F","O_Heli_Transport_04_F","O_Heli_Transport_04_ammo_F","O_Heli_Transport_04_bench_F","O_Heli_Transport_04_box_F","O_Heli_Transport_04_covered_F","O_Heli_Transport_04_fuel_F","O_Heli_Transport_04_medevac_F","O_Heli_Transport_04_repair_F"]; //Set Repair Action _Btn1 ctrlSetText localize "STR_vInAct_Repair"; _Btn1 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_repairTruck;"; if("ToolKit" in (items player) && (damage _curTarget < 1)) then {_Btn1 ctrlEnable true;} else {_Btn1 ctrlEnable false;}; if(playerSide == west) then { _Btn2 ctrlSetText localize "STR_vInAct_Registration"; _Btn2 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_searchVehAction;"; _Btn3 ctrlSetText localize "STR_vInAct_SearchVehicle"; _Btn3 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_vehInvSearch;"; _Btn4 ctrlSetText localize "STR_vInAct_PullOut"; _Btn4 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_pulloutAction;"; if(count crew _curTarget == 0) then {_Btn4 ctrlEnable false;}; _Btn5 ctrlSetText localize "STR_vInAct_Impound"; _Btn5 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_impoundAction;"; if(_curTarget isKindOf "Ship") then { _Btn6 ctrlSetText localize "STR_vInAct_PushBoat"; _Btn6 buttonSetAction "[] spawn life_fnc_pushObject; closeDialog 0;"; if(_curTarget isKindOf "Ship" && {local _curTarget} && {count crew _curTarget == 0}) then { _Btn6 ctrlEnable true;} else {_Btn6 ctrlEnable false}; } else { if((typeOf (_curTarget) in _dlcVehicles) && !(288520 in getDLCs 1)) then { if(_curTarget isKindOf "Air") then { _Btn6 ctrlSetText localize "STR_vInAct_GetInHeli"; } else { _Btn6 ctrlSetText localize "STR_vInAct_GetInKart"; }; _Btn6 buttonSetAction "player moveInDriver life_vInact_curTarget; closeDialog 0;"; if(count crew _curTarget == 0 && {canMove _curTarget} && {locked _curTarget == 0}) then {_Btn6 ctrlEnable true;} else {_Btn6 ctrlEnable false}; } else { _Btn6 ctrlSetText localize "STR_vInAct_Unflip"; _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;"; if(count crew _curTarget == 0 && {canMove _curTarget}) then { _Btn6 ctrlEnable false;} else {_Btn6 ctrlEnable true;}; }; }; } else { if(_curTarget isKindOf "Ship") then { _Btn2 ctrlSetText localize "STR_vInAct_PushBoat"; _Btn2 buttonSetAction "[] spawn life_fnc_pushObject; closeDialog 0;"; if(_curTarget isKindOf "Ship" && {local _curTarget} && {count crew _curTarget == 0}) then { _Btn2 ctrlEnable true;} else {_Btn2 ctrlEnable false}; } else { if((typeOf (_curTarget) in _dlcVehicles) && !(288520 in getDLCs 1)) then { if(_curTarget isKindOf "Air") then { _Btn2 ctrlSetText localize "STR_vInAct_GetInHeli"; } else { _Btn2 ctrlSetText localize "STR_vInAct_GetInKart"; }; _Btn2 buttonSetAction "player moveInDriver life_vInact_curTarget; closeDialog 0;"; if(count crew _curTarget == 0 && {canMove _curTarget} && {locked _curTarget == 0}) then {_Btn2 ctrlEnable true;} else {_Btn2 ctrlEnable false}; } else { _Btn2 ctrlSetText localize "STR_vInAct_Unflip"; _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;"; if(count crew _curTarget == 0 && {canMove _curTarget}) then { _Btn2 ctrlEnable false;} else {_Btn2 ctrlEnable true;}; }; }; if(typeOf _curTarget == "O_Truck_03_device_F") then { _Btn3 ctrlSetText localize "STR_vInAct_DeviceMine"; _Btn3 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_deviceMine"; if(!isNil {(_curTarget getVariable "mining")} OR !local _curTarget && {_curTarget in life_vehicles}) then { _Btn3 ctrlEnable false; } else { _Btn3 ctrlEnable true; }; } else { _Btn3 ctrlShow false; }; if(license_civ_rebel) then { _Btn4 ctrlSetText localize "STR_vInAct_PullOut"; _Btn4 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_pulloutAction;"; if(count crew _curTarget == 0) then {_Btn4 ctrlEnable false;}; } else{ _Btn4 ctrlShow false; }; _Btn5 ctrlShow false; _Btn6 ctrlShow false; }; 7.Go to your/core/functions/ and open fn_actionKeyHandler.sqf Find if (isPlayer _curObject && _curObject isKindOf "Man") then { if ((_curObject getVariable ["restrained",false]) && !dialog && playerSide isEqualTo west) then { [_curObject] call life_fnc_copInteractionMenu; }; and right after the last semi-colon and before the " } else { " and add if ((_curObject getVariable ["restrained",false]) && !dialog && playerSide == civilian) then { [_curObject] call life_fnc_civInteractionMenu; }; It should look something like this if(isPlayer _curObject && _curObject isKindOf "Man") then { if((_curObject getVariable ["restrained",false]) && !dialog && playerSide == west) then { [_curObject] call life_fnc_copInteractionMenu; }; if ((_curObject getVariable ["restrained",false]) && !dialog && playerSide == civilian) then { [_curObject] call life_fnc_civInteractionMenu; }; } else { Thats it! Let's hope i didnt forget anything. Enjoy! If you get any error post your rpt logs. Click here to see how on the offical wiki. Here is the ziptie icon for those who need it. ziptie.paa
×