norrin 9 Posted May 26, 2007 Respawning vehicle crew restriction script - For players only Description NB:  These scripts are designed for missions where the playable AI is disabled and they do not affect unplayable AI.  I’ve sorted out a method for restricting where players can sit in respawning vehicles that may be of use to someone out there. I started by adding eventhandlers to the vehicles themselves but these only acted on the hosting server when the vehicles respawned not the players machines, therefore I moved to another method. Essentially with these scripts only west pilots can pilot western planes and choppers and act as gunners, ditto for east pilots. Only west crew can crew M1Abrams and strikers and east crew T72s and BMPs. These scripts therefore stop normal combat troops from using these vehicles and also stop west troops be it pilots or otherwise stealing the east vehicles, choppers and planes etc. It may take a second or two for the script to kick in once a player boards a vehicle but before you know it you’ll be standing outside the vehicle again. Although they are stopped from piloting, driving, gunning and commanding vehicles normal troops can still be carried around in the cargo (in back) so they can still board blackhawks etc when they need to get places. All players can drive Hummers, UAZs, motorbikes, boats etc. The vehicles covered by this script for the moment are: Su34B, Su34, KA50, MI17_MG, MI17, T72, BMP2, BMP2Ambul, AV8B, AV8B2, AH1W, UH60MG, MH6, M1Abrams, Stryker_ICV_M2, Stryker_ICV_MK19, Stryker_TOW. Let me know if you want any others We’d you get it: right here Implementation To make it all work: 1. you’ll need to copy across the info from the init.sqf file 2. copy the vcl_lock folder into your mission directory 3. Add a trigger on the map with the following settings (it can be as small or as big as you like): Activation: Game Logic – Repeatedly Countdown: min 0 max 0 med 0 Type: None Condition: onConnect On Act: call{[] execVM "vcl_lock\onConnect.sqf"}; Other notes No changes need to be made to the vehicle respawn script to use this system as its based on the player and not the vehicle. Tested On 1.05 both dedicated and local servers with JIP Bugs As BIS haven’t set up a position for the second gunner on choppers yet I can’t stop normal troops from acting as the second door gunners on blackhawks and MI17s. Crystal Ball - If BIS ever get the isKindOf command functioning on dedicated servers we’ll be able to tidy up this script considerably. - No plan at this point to make this work with AI enabled or for unplayable AI Let me know if you run into any probs, norrin Share this post Link to post Share on other sites