Beowulfv 305 Report post Posted May 26, 2018 (edited) This adds the ability to lock and unlock vehicles from the inside with either scroll wheel functions or the Exile default hot key to lock and unlock objects. Installation Instruction Step 1: Open your initPlayerLocal.sqf and paste the following into it (There is an example initPlayerLocal.sqf you can use to copy from) [] execVM "Custom\Actions\fnc_showActions.sqf"; Step 2: In your mission root open config.sqf and find class CfgExileCustomCode and insert the below //Custom keys ExileClient_gui_hud_event_onKeyUp = "Custom\overwrites\ExileClient_gui_hud_event_onKeyUp.sqf"; For Example: class CfgExileCustomCode { //Custom keys ExileClient_gui_hud_event_onKeyUp = "Custom\overwrites\ExileClient_gui_hud_event_onKeyUp.sqf"; }; Step 3: Edit your description.exe and add the following class CfgFunctions { #include "Custom\CfgFunctions.cpp" }; Step 4: Place the Custom folder into your mission folder That's it Enjoy!Download **EDIT TO CODE** If you are looking for a way to force unlock the vehicle when the driver is killed, then you can use the following edit to do so. Step 1: Open fnc_showAction.sqf located in the Actions folder. Spoiler [] spawn { while {true} do { waitUntil{!isNil "ExileClientLoadedIn"}; UISleep 0.1; waitUntil{ExileClientLoadedIn}; UISleep 0.1; waitUntil{alive player}; LOCK_ACTION = player addAction ["<t>Lock</t>", "true spawn Exile_fnc_lock_toggle","",-10,true,true,"","vehicle player != player && locked cameraOn isEqualTo 0"]; UNLOCK_ACTION = player addAction ["<t>Unlock</t>", "false spawn Exile_fnc_lock_toggle","",-10,true,true,"","vehicle player != player && locked cameraOn isEqualTo 2"]; waitUntil{!alive player}; player removeAction LOCK_ACTION; player removeAction UNLOCK_ACTION; }; }; Step 2: Make the following changes below. The original is posted above for comparison. Spoiler [] spawn { while {true} do { waitUntil{!isNil "ExileClientLoadedIn"}; UISleep 0.1; waitUntil{ExileClientLoadedIn}; UISleep 0.1; waitUntil{alive player}; LOCK_ACTION = player addAction ["<t>Lock</t>", "true spawn Exile_fnc_lock_toggle","",-10,true,true,"","vehicle player != player && locked cameraOn isEqualTo 0"]; UNLOCK_ACTION = player addAction ["<t>Unlock</t>", "false spawn Exile_fnc_lock_toggle","",-10,true,true,"","vehicle player != player && locked cameraOn isEqualTo 2"]; waitUntil{!alive player}; player removeAction LOCK_ACTION; player removeAction UNLOCK_ACTION; if (vehicle player != player && locked cameraOn isEqualTo 2) then { false spawn Exile_fnc_lock_toggle; }; }; }; And you're done. Edited October 6, 2018 by Beowulfv 6 Share this post Link to post Share on other sites
BaroN 256 Report post Posted May 27, 2018 Great post and nice work @Beowulfv However, it is worth considering that whenever a player gets shot in the vehicle, the player who killed him can't then get the vehicle as a reward.... There is some code released somewhere which auto ejects players from vehicles as they are killed, maybe you could add that and then set the vehicle to unlock as the driver is ejected...? Just a thought but, again, nice work 2 Share this post Link to post Share on other sites
Teacher 13 Report post Posted June 3, 2018 Hi, sitting inside the transport appears only the function" Lock " but it is not active, what could be the reason? Share this post Link to post Share on other sites
Beowulfv 305 Report post Posted June 4, 2018 3 hours ago, Teacher said: Hi, sitting inside the transport appears only the function" Lock " but it is not active, what could be the reason? If it's unlocked, Lock will appear. If it's locked, unlock will appear. Idk what you mean by "it's not active". Share this post Link to post Share on other sites
Teacher 13 Report post Posted June 4, 2018 6 hours ago, Beowulfv said: If it's unlocked, Lock will appear. If it's locked, unlock will appear. Idk what you mean by "it's not active". This means that the "Lock" function itself is present in the menu, but when you click on it, nothing happens, as if it is not active Share this post Link to post Share on other sites
Beowulfv 305 Report post Posted June 4, 2018 (edited) 49 minutes ago, Teacher said: when you click on it I have uploaded this addon to a vanilla Exile.Altis and see my error. Standby for an update to the instructions and GitHub Edited June 4, 2018 by Beowulfv Share this post Link to post Share on other sites
Beowulfv 305 Report post Posted June 4, 2018 @Teacher Instructions on main post have been updated, missing step has been added and the file was added to the download. Please re-download the new ZIP file and follow the steps. Thank you for pointing that out. Share this post Link to post Share on other sites
Teacher 13 Report post Posted June 4, 2018 (edited) 9 hours ago, Beowulfv said: @Teacher Instructions on main post have been updated, missing step has been added and the file was added to the download. Please re-download the new ZIP file and follow the steps. Thank you for pointing that out. Well, nothing, thank you for the script! P.S. Everything works like clockwork Edited June 4, 2018 by Teacher 1 Share this post Link to post Share on other sites
Sayago 2 Report post Posted June 6, 2018 Just to add: I use vector building eXpoch and it already contained a custom code for ExileClient_gui_hud_event_onKeyUp I just did not use the overwrite of this script. I left as was without using the custom download. It's working. Thank you 1 Share this post Link to post Share on other sites
Beowulfv 305 Report post Posted June 6, 2018 39 minutes ago, Sayago said: Just to add: I use vector building eXpoch and it already contained a custom code for ExileClient_gui_hud_event_onKeyUp I just did not use the overwrite of this script. I left as was without using the custom download. It's working. Thank you All we are adding to that file is an extra check for a player being inside a vehicle so they can use the Exile hotkey to lock and unlock objects. if (_keyCode in (actionKeys "User1")) exitWith { if (vehicle player != player) then { if !(ExileClientIsHandcuffed) then { call Exile_fnc_vehicle_interaction_keyLock; }; }else{ if !(ExileClientIsHandcuffed) then { call ExileClient_object_vehicle_interaction_keyLock; }; }; true }; 3 Share this post Link to post Share on other sites