Jump to content

AngryHerring ッ ®™

Members
  • Posts

    73
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by AngryHerring ッ ®™

  1. Great, you just need to replicate this once more some lines further down (after line 187). Just add the same code underneath _btn7
  2. @Eddie Lopezadd sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1); Inside each of the controls' entries you would like the text to be adjusted. Changing the value "1" will (in/de)crease the text size
  3. fn_houseMenu.sqf Added another button to the dialog. This should be all you need. Don't be afraid to try something out, scripting is basically doing something, and debugging after. My thought process was to find where the garagemenu was called (from pressing windowsKey). I checked my fn_actionKeyHandler.sqf (handles basically every press of the windowskey and checks stuff). Inside it I found where it checks for a house (garage counts too). Inside houseMenu I looked for anything that handles the buttons for garage actions. I copied the existing button for normal garages, and changed CAR to TANK
  4. Ahhh, might be a wrong spawnpoint in your mission.sqm. Go check if both match up (car and tank) (the addAction command for car and tank i think item82 (addaction tank) has the wrong spawnpoint
  5. Show me your fn_vehicleCreate.sqf you might need to add: case (_vehicle isKindOf "Tank"): {"Tank"}; Under the case for ships after this, try purchasing and storing a tank, then open the garage
  6. Not gonna give up this easy., we'll get this to work. Inside your database, vehicle tab (data), what is the type (for the tank)? type should be number 5 on that row.
  7. class Item82 { dataType="Object"; class PositionInfo { position[]={14473.48,19.166288,17753.941}; angles[]={6.2765183,2.6579969,0.022654373}; }; side="Civilian"; flags=4; class Attributes { skill=0.60000002; init="this enableSimulation false; this allowDamage false; this addAction[localize""STR_Garage_Title"", { if (life_HC_isActive) then { [getPlayerUID player,playerSide,""Car"",player] remoteExecCall [""HC_fnc_getVehicles"",HC_Life]; } else { [getPlayerUID player,playerSide,""Car"",player] remoteExecCall [""TON_fnc_getVehicles"",2];}; life_garage_type = ""Car""; createDialog ""Life_impound_menu""; disableSerialization; ctrlSetText[2802,""Fetching Vehicles....""]; life_garage_sp = ""car_g_3""; },"""",1.5,true,true,"""",""true"",5]; this addAction[localize""STR_MAR_Store_vehicle_in_Garage"",life_fnc_storeVehicle,"""",0,false,false,"""",'!life_garage_store',5]; this addAction[""Tank Garage"", { if (life_HC_isActive) then { [getPlayerUID player,playerSide,""Tank"",player] remoteExecCall [""HC_fnc_getVehicles"",HC_Life]; } else { [getPlayerUID player,playerSide,""Tank"",player] remoteExecCall [""TON_fnc_getVehicles"",2];}; life_garage_type = ""Tank""; createDialog ""Life_impound_menu""; disableSerialization; ctrlSetText[2802,""Fetching Vehicles....""]; life_garage_sp = ""car_g_1""; },"""",1.5,true,true,"""",""true"",5];"; disableSimulation=1; }; id=1027; type="C_man_1"; class CustomAttributes { class Attribute0 { property="allowDamage"; expression="_this allowdamage _value;"; class Value { class data { class type { type[]= { "BOOL" }; }; value=0; }; }; }; class Attribute1 { property="speaker"; expression="_this setspeaker _value;"; class Value { class data { class type { type[]= { "STRING" }; }; value="Male01GRE"; }; }; }; class Attribute2 { property="pitch"; expression="_this setpitch _value;"; class Value { class data { class type { type[]= { "SCALAR" }; }; value=0.95999998; }; }; }; nAttributes=3; }; }; class Item83 { dataType="Object"; class PositionInfo { position[]={3739.4629,12.758859,13267.433}; angles[]={0.022654373,0.90746647,6.2618575}; }; side="Civilian"; flags=4; class Attributes { skill=0.60000002; init="this enableSimulation false; this allowDamage false; this addAction[localize""STR_Garage_Title"", { if (life_HC_isActive) then { [getPlayerUID player,playerSide,""Car"",player] remoteExecCall [""HC_fnc_getVehicles"",HC_Life]; } else { [getPlayerUID player,playerSide,""Car"",player] remoteExecCall [""TON_fnc_getVehicles"",2];}; life_garage_type = ""Car""; createDialog ""Life_impound_menu""; disableSerialization; ctrlSetText[2802,""Fetching Vehicles....""]; life_garage_sp = ""car_g_1""; },"""",1.5,true,true,"""",""true"",5]; this addAction[localize""STR_MAR_Store_vehicle_in_Garage"",life_fnc_storeVehicle,"""",0,false,false,"""",'!life_garage_store',5]; this addAction[""Tank Garage"", { if (life_HC_isActive) then { [getPlayerUID player,playerSide,""Tank"",player] remoteExecCall [""HC_fnc_getVehicles"",HC_Life]; } else { [getPlayerUID player,playerSide,""Tank"",player] remoteExecCall [""TON_fnc_getVehicles"",2];}; life_garage_type = ""Tank""; createDialog ""Life_impound_menu""; disableSerialization; ctrlSetText[2802,""Fetching Vehicles....""]; life_garage_sp = ""car_g_1""; },"""",1.5,true,true,"""",""true"",5];"; disableSimulation=1; }; id=1028; type="C_man_1"; atlOffset=-1.9073486e-006; class CustomAttributes { class Attribute0 { property="allowDamage"; expression="_this allowdamage _value;"; class Value { class data { class type { type[]= { "BOOL" }; }; value=0; }; }; }; class Attribute1 { property="speaker"; expression="_this setspeaker _value;"; class Value { class data { class type { type[]= { "STRING" }; }; value="Male02GRE"; }; }; }; class Attribute2 { property="pitch"; expression="_this setpitch _value;"; class Value { class data { class type { type[]= { "SCALAR" }; }; value=1.02; }; }; }; nAttributes=3; }; };
  8. Okay, you need another eventhandler for when taking damage (I think its called handleDammage). Add a check; if you are inside the zone, ignore damage (use getdammage player or something).
  9. PS: It is easier to do this in the editor than in the mission.sqm by code. Caution: This edit will only happen on this NPC (at cords 3839, 13267), and you will have to replicate this on other garages if you want the ability to open the garage for tanks there as well. Editing the existing INIT is the way to go, (you dont need to add a whole new entry). That will make a lot of fuss. Also, if you replace the existing addAction (from "CAR" to tank) the garage will be overridden (it will now only load tanks into the list). Another separate addAction for the TANKS' garage is needed. We will do this by copying the very same command for normal garages, and place it in the same init line, within the quotes (") and make a few modifications. Step-by-step: I've added a separate addAction command (named Tank garage) in the init = "...";. class Item83 { dataType="Object"; class PositionInfo { position[]={3739.4629,12.758859,13267.433}; angles[]={0.022654373,0.90746647,6.2618575}; }; side="Civilian"; flags=4; class Attributes { skill=0.60000002; init="this enableSimulation false; this allowDamage false; this addAction[localize""STR_Garage_Title"", { if (life_HC_isActive) then { [getPlayerUID player,playerSide,""Car"",player] remoteExecCall [""HC_fnc_getVehicles"",HC_Life]; } else { [getPlayerUID player,playerSide,""Car"",player] remoteExecCall [""TON_fnc_getVehicles"",2];}; life_garage_type = ""Car""; createDialog ""Life_impound_menu""; disableSerialization; ctrlSetText[2802,""Fetching Vehicles....""]; life_garage_sp = ""car_g_1""; },"""",1.5,true,true,"""",""true"",5]; this addAction[localize""STR_MAR_Store_vehicle_in_Garage"",life_fnc_storeVehicle,"""",0,false,false,"""",'!life_garage_store',5]; this addAction[""Tank Garage"", { if (life_HC_isActive) then { [getPlayerUID player,playerSide,""Tank"",player] remoteExecCall [""HC_fnc_getVehicles"",HC_Life]; } else { [getPlayerUID player,playerSide,""Tank"",player] remoteExecCall [""TON_fnc_getVehicles"",2];}; life_garage_type = ""Tank""; createDialog ""Life_impound_menu""; disableSerialization; ctrlSetText[2802,""Fetching Vehicles....""]; life_garage_sp = ""car_g_1""; },"""",1.5,true,true,"""",""true"",5];"; disableSimulation=1; }; id=1028; type="C_man_1"; atlOffset=-1.9073486e-006; class CustomAttributes { class Attribute0 { property="allowDamage"; expression="_this allowdamage _value;"; class Value { class data { class type { type[]= { "BOOL" }; }; value=0; }; }; }; class Attribute1 { property="speaker"; expression="_this setspeaker _value;"; class Value { class data { class type { type[]= { "STRING" }; }; value="Male02GRE"; }; }; }; class Attribute2 { property="pitch"; expression="_this setpitch _value;"; class Value { class data { class type { type[]= { "SCALAR" }; }; value=1.02; }; }; }; nAttributes=3; }; }; Here is the standalone code: this addAction[""Tank Garage"", { if (life_HC_isActive) then { [getPlayerUID player,playerSide,""Tank"",player] remoteExecCall [""HC_fnc_getVehicles"",HC_Life]; } else { [getPlayerUID player,playerSide,""Tank"",player] remoteExecCall [""TON_fnc_getVehicles"",2];}; life_garage_type = ""Tank""; createDialog ""Life_impound_menu""; disableSerialization; ctrlSetText[2802,""Fetching Vehicles....""]; life_garage_sp = ""car_g_1""; },"""",1.5,true,true,"""",""true"",5]; When replicating this command to other garages placed on the map, it is important to change life_garage_sp (the spawn point for the car). Quck tip for this: use the existing SP for normal garages. How would this look in game? when you scroll on a garage you will have two options, one for Garage, and one for Tank Garage. hope this works. Useful link: addAction command (Bohemia wiki)
  10. In your mission.sqm (in the editor, on the "shops/npc's", called attributes).
  11. this addAction[localize""STR_Garage_Title"", { if (life_HC_isActive) then { [getPlayerUID player,playerSide,""Car"",player] remoteExecCall [""HC_fnc_getVehicles"",HC_Life]; } else { [getPlayerUID player,playerSide,""Car"",player] remoteExecCall [""TON_fnc_getVehicles"",2];}; createDialog ""Life_impound_menu""; disableSerialization; ctrlSetText[2802,""Fetching Vehicles....""]; life_garage_sp = ""cop_car_1""; life_garage_type = ""Car""; },"""",0,false,false,"""",'playerSide isEqualTo west',5]; You see how the framework handles different garages? Each garage is handled for AIR, CAR and SHIP. The simplest solution (also kinda wacky), you can add a separate addAction, where you change life_garage_type and [getPlayerUID player,playerSide,""Car"",player] to TANK
  12. Try this for a change? Added a early check if the license exists, if not, exit. #include "..\..\script_macros.hpp" /* File: fn_processAction.sqf Author: Bryan "Tonic" Boardwine Modified : NiiRoZz Description: Master handling for processing an item. NiiRoZz : Added multiprocess */ private ["_vendor","_type","_itemInfo","_oldItem","_newItemWeight","_newItem","_oldItemWeight","_cost","_upp","_hasLicense","_itemName","_oldVal","_ui","_progress","_pgText","_cP","_materialsRequired","_materialsGiven","_noLicenseCost","_text","_filter","_totalConversions","_minimumConversions"]; _vendor = [_this,0,objNull,[objNull]] call BIS_fnc_param; _type = [_this,3,"",[""]] call BIS_fnc_param; //--- Error check if (isNull _vendor || _type isEqualTo "" || (player distance _vendor > 10)) exitWith {}; life_action_inUse = true;//Lock out other actions during processing. if (isClass (missionConfigFile >> "ProcessAction" >> _type)) then { _filter = false; _materialsRequired = M_CONFIG(getArray,"ProcessAction",_type,"MaterialsReq"); _materialsGiven = M_CONFIG(getArray,"ProcessAction",_type,"MaterialsGive"); _noLicenseCost = M_CONFIG(getNumber,"ProcessAction",_type,"NoLicenseCost"); _text = M_CONFIG(getText,"ProcessAction",_type,"Text"); } else {_filter = true;}; if (_filter) exitWith {life_action_inUse = false;}; //--- Wacky shit. _hasLicense = LICENSE_VALUE(_type,"civ"); if !(_hasLicense) exitWith {hint str "STR_Process_NoLicenseDisabled"; life_action_inUse = false;}; _itemInfo = [_materialsRequired,_materialsGiven,_noLicenseCost,(localize format ["%1",_text])]; if (count _itemInfo isEqualTo 0) exitWith {life_action_inUse = false;}; //--- Setup vars. _oldItem = _itemInfo select 0; _newItem = _itemInfo select 1; _cost = _itemInfo select 2; _upp = _itemInfo select 3; _exit = false; if (count _oldItem isEqualTo 0) exitWith {life_action_inUse = false;}; _totalConversions = []; { _var = ITEM_VALUE(_x select 0); if (_var isEqualTo 0) exitWith {_exit = true;}; if (_var < (_x select 1)) exitWith {_exit = true;}; _totalConversions pushBack (floor (_var/(_x select 1))); } forEach _oldItem; if (_exit) exitWith {life_is_processing = false; hint localize "STR_NOTF_NotEnoughItemProcess"; life_action_inUse = false;}; _minimumConversions = _totalConversions call BIS_fnc_lowestNum; _oldItemWeight = 0; { _weight = ([_x select 0] call life_fnc_itemWeight) * (_x select 1); _oldItemWeight = _oldItemWeight + _weight; } count _oldItem; _newItemWeight = 0; { _weight = ([_x select 0] call life_fnc_itemWeight) * (_x select 1); _newItemWeight = _newItemWeight + _weight; } count _newItem; _exit = false; if (_newItemWeight > _oldItemWeight) then { _netChange = _newItemWeight - _oldItemWeight; _freeSpace = life_maxWeight - life_carryWeight; if (_freeSpace < _netChange) exitWith {_exit = true;}; private _estConversions = floor(_freeSpace / _netChange); if (_estConversions < _minimumConversions) then { _minimumConversions = _estConversions; }; }; if (_exit) exitWith {hint localize "STR_Process_Weight"; life_is_processing = false; life_action_inUse = false;}; //--- Setup our progress bar. disableSerialization; "progressBar" cutRsc ["life_progress","PLAIN"]; _ui = uiNamespace getVariable "life_progress"; _progress = _ui displayCtrl 38201; _pgText = _ui displayCtrl 38202; _pgText ctrlSetText format ["%2 (1%1)...","%",_upp]; _progress progressSetPosition 0.01; _cP = 0.01; //--- Start progress. life_is_processing = true; for "_i" from 0 to 1 step 0 do { uiSleep 0.28; _cP = _cP + 0.01; _progress progressSetPosition _cP; _pgText ctrlSetText format ["%3 (%1%2)...",round(_cP * 100),"%",_upp]; if (_cP >= 1) exitWith {}; if (player distance _vendor > 10) exitWith {}; }; if (player distance _vendor > 10) exitWith {hint localize "STR_Process_Stay"; "progressBar" cutText ["","PLAIN"]; life_is_processing = false; life_action_inUse = false;}; { [false,(_x select 0),((_x select 1)*(_minimumConversions))] call life_fnc_handleInv; } count _oldItem; { [true,(_x select 0),((_x select 1)*(_minimumConversions))] call life_fnc_handleInv; } count _newItem; "progressBar" cutText ["","PLAIN"]; if (_minimumConversions isEqualTo (_totalConversions call BIS_fnc_lowestNum)) then {hint localize "STR_NOTF_ItemProcess";} else {hint localize "STR_Process_Partial";}; life_is_processing = false; life_action_inUse = false;
  13. Should be in your storeVehicle, there is a line of code which checks for what type of object. (CfgVehicles) _nearVehicles = nearestObjects[getPos (_this select 0),["Car","Air","Ship"],30] I believe adding "Tank" to this array will fix this.
  14. Make sure you have this in your processAction if (_noLicenseCost isEqualTo -1) exitWith { life_action_inUse = false; hint localize "STR_Process_NoLicenseDisabled"; }; then in your config process set "NoLicenseCost = -1" on every instance fn_processAction.sqf
  15. @LoSantos_YT using remoteExecCall ex: ["Area X has been captured", "warning"] remoteExecCall ["Aquaman_fnc_notification_system", 0]; the 0 is it's target (0 meaning global execution, server and every client). Notice: Make sure you whitelist "Aquaman_fnc_notification_system" in your CfgRemoteExec.hpp file
  16. Great! Just tested this (AL 5.0), and it works! I believe some things needs to be cleared up though. In step 8, I believe you mean in the fn_keyHandler.sqf, and NOT the handeDamage? (i put it there, and it works). While downed, you are still able to interact with stuff (player menu, etc). Maybe a life_interrupted = true; needs to be put in place? Medic distance doesn't work yet, still says "Script". After forcing a respawn, you are still in the "Killed" animation (I've checked my rpt's, and followed the tutorial to the letter, nothing wrong here). However, if you wait for to bleed out, it doesn't happen 😀 Also, the dialog are not in the correct order. It looks like the progress bar is behind the background. See picture for reference: https://imgur.com/a/DRe0waf
  17. @Aura Try this: ["Title", format ["%1 just ran over %2!", name _driver, name player]] remoteExecCall ["UPM_fnc_showNotification", 0];
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.