profcupcake 11 Posted January 21, 2014 (edited) A script that will restrict certain vehicles to certain drivers/gunners/commanders (or pilots/copilots, etc.). If a unit which is not allowed to be the driver, gunner or commander of a vehicle attempts to go into those spots, they are removed, and get a warning message. Two sentences is all my mind can cope with. Download link Armaholic page (Made on request for a squadmate) Edited January 27, 2014 by ProfCupcake 1 Share this post Link to post Share on other sites
Guest Posted January 21, 2014 (edited) Release frontpaged on the Armaholic homepage. Dead Simple Vehicle Restrictor ================================================ We have also "connected" these pages to your account on Armaholic. This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have. When you have any questions already feel free to PM or email me! Edited January 27, 2014 by Guest mirror updated with the below version Share this post Link to post Share on other sites
profcupcake 11 Posted January 27, 2014 (edited) UPDATE It now also checks the commander spot, which I had overlooked. It now uses "Eject" instead of "GetOut", due to most "GetOut" animations being too slow. Never mind, reverted it. It doesn't skip the animation when the vehicle is stationary, seemingly. Gah. Aha! I knew it existed somewhere. It now uses moveOut, which does instantly eject units without animation. It now also supports player UIDs for the 'allowed drivers' list. Edited February 3, 2014 by ProfCupcake Share this post Link to post Share on other sites
king_richard 10 Posted January 30, 2014 Like your simple scripts! Especially for someone new to arma scripting. However, the copilot can still take controls and this position is accessible by those whom aren't on the list. I'm looking for the name of the that position but it's taking me awhile to find the list in the config viewer. Share this post Link to post Share on other sites
mariodu62 5 Posted January 31, 2014 Like your simple scripts! Especially for someone new to arma scripting.However, the copilot can still take controls and this position is accessible by those whom aren't on the list. I'm looking for the name of the that position but it's taking me awhile to find the list in the config viewer. use ControlsShifted event and you will know who has taken control... http://community.bistudio.com/wiki/ArmA_3:_Event_Handlers Share this post Link to post Share on other sites
king_richard 10 Posted February 1, 2014 Thanks 51Mariodu62, I setup this in the init of one of the heli's this addEventHandler ["ControlsShifted", {null = [] execVM "Scripts\coPilot.sqf"}] this is in the coPilot.sqf if (typeof player != "B_Helipilot_F")then { moveOut player; hint "You are not authorized to fly"; }; Which works, however, I'd like to be able to just switch controls back without moving the player out. I have not the slightest idea on how to do that. Share this post Link to post Share on other sites
profcupcake 11 Posted February 3, 2014 Like your simple scripts! Especially for someone new to arma scripting.However, the copilot can still take controls and this position is accessible by those whom aren't on the list. I'm looking for the name of the that position but it's taking me awhile to find the list in the config viewer. Uh, are you sure? It checks all positions on the vehicle except cargo, so that shouldn't be possible. Is there a specific vehicle this happens in? Can you reproduce it with the latest version? ---------- Post added at 14:35 ---------- Previous post was at 14:33 ---------- UPDATE You can now choose which seats are checked You can now set the message shown when a player is ejected You can now call the script multiple times to effectively make multiple separate whitelists Slightly optimised Details on how to use the above features are in the USAGE.txt ---------- Post added at 14:44 ---------- Previous post was at 14:35 ---------- ...someone new to arma scripting... That's pretty much exactly why I started on really simple stuff :D Share this post Link to post Share on other sites
Guest Posted February 3, 2014 Newest version frontpaged on the Armaholic homepage. Dead Simple Vehicle Restrictor ================================================ We have also "connected" these pages to your account on Armaholic. This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have. When you have any questions already feel free to PM or email me! Share this post Link to post Share on other sites
king_richard 10 Posted February 7, 2014 Sorry have not got around to testing the new version since it's just a small group of us playing the mission as of now. However, I realized that I disabled the gunner check and that's most likely the reason I was able to sit in the copilot seat and take controls. When I get some more time and the mission is nearing public ready I'll test it out again. Share this post Link to post Share on other sites
king_richard 10 Posted March 13, 2014 Was reading through the command list for something and found one for enableCoPilot! So, all that has to be done for the copilot issue is to add this enableCopilot false; To the vehicle's init or similar. Share this post Link to post Share on other sites
Taylor.C 10 Posted April 2, 2014 can i get an example of some sort i cant get it working. Share this post Link to post Share on other sites
Rellikplug 11 Posted June 10, 2014 (edited) I am unable to get this to work either. init.sqf [s]if (!isDedicated) then { waitUntil {!isNull player}; // waitUntil the player variable exists[/s] [["O_MBT_02_cannon_F"],["O_crew_F"], "Only a Tank Crewman can operate the tank.",true,true,true] execVM "scripts\restrictVehicles.sqf"; EDIT: Works Now. Edited June 10, 2014 by Rellikplug Crossed out part was preventing Share this post Link to post Share on other sites
profcupcake 11 Posted June 11, 2014 I am unable to get this to work either.init.sqf [s]if (!isDedicated) then { waitUntil {!isNull player}; // waitUntil the player variable exists[/s] [["O_MBT_02_cannon_F"],["O_crew_F"], "Only a Tank Crewman can operate the tank.",true,true,true] execVM "scripts\restrictVehicles.sqf"; EDIT: Works Now. Yeah, looks like you missed a } there. Other than that, it seems solid. Share this post Link to post Share on other sites
Sampl 10 Posted June 30, 2014 Uh, are you sure? It checks all positions on the vehicle except cargo, so that shouldn't be possible. Is there a specific vehicle this happens in? Can you reproduce it with the latest version? the scripts works perfectly on the hellcat. it does not include the copilot seat on the rest of the choppers.. but does include the left door gunner of a ghost hawk.. Share this post Link to post Share on other sites