Jump to content

Recommended Posts

Hey today im releasing my Mechanic Toolbox script that i made for a framework im working on. ENJOY! :)

feel free to change the icon of the mechanic toolbox i havent changed it because im a sloth


PLEASE READ
This is for a mechanic jobs you can make out of it and its made so when the normal toolkit is used it repairs 40%  and you need a mechanic toolbox to get it to a 100% but if you want it to work as a job you can easy make it whitelisted for a licensens or add the item in the script of a loadout script if you have that, idc but just a reminder so you know its purpose

DOWNLOAD INFOMATION [difficulty should be easy]


Step 1: go inside youre core\actions and paste this in there fn_Mechanictool.sqf

Step 2: now go into youre config_vItem.hpp and paste this code in the class VirtualItems 

class MechanicTool {
variable = "MechanicTool";
displayName = "STR_Item_FMCD";
weight = 4;
buyPrice = 350;
sellPrice = 100;
illegal = false;
edible = -1;
icon = "\a3\weapons_f\items\data\UI\gear_toolkit_ca.paa";
};

Step 3: replace these lines in the fn_vInteractionMenu.sqf :
#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;

whit this: 
#define Btn1 37450
#define Btn2 37451
#define Btn3 37452
#define Btn4 37453
#define Btn5 37454
#define Btn6 37455
#define Btn7 37155
#define Title 37401
private["_display","_curTarget","_Btn1","_Btn2","_Btn3","_Btn4","_Btn5","_Btn6","_Btn7","_dlcVehicles"];
if (!dialog) then {
createDialog "vInteraction_Menu";
};
disableSerialization;

step 4: in the same folder replace these lines: 
_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"];

whit these:
_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;
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"];

Step 5: now add this in the same file under the repair action should look something like this https://gyazo.com/d9701e0928f12f2dd553ff0d7497584b
// mechanic repair action by fanzer
_Btn7 ctrlSetText localize "STR_fzact_Repair";
_Btn7 buttonSetAction "[life_vInact_curTarget] spawn life_fnc_Mechanictool; closeDialog 0;";

step 6: then add this in the same file under the life_inv_toolkit should look something like this
https://gyazo.com/24240b9883cc0db0337c24a13898be25
if ((life_inv_MechanicTool >= 1) && {alive life_vInact_curTarget} && {([life_vInact_curTarget] call life_fnc_isDamaged)}) then {_Btn7 ctrlEnable true;} else {_Btn7 ctrlEnable false;};

step 7: now go inside youre functions.hpp and go down to class Actions and add this line: 
class Mechanictool {};

step 8: now go inside the stringtable.xml and go somewhere at the buttom or where ever you want and add this line: 
<Key ID="STR_Item_FMCD">
<Original>Mechanic Toolbox</Original>
</Key>

and you should be done if you have any problems ill will help if i have time! 
  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...