MeNeZ 0 Posted March 10, 2007 Hi, Does anyone know how to make it so that only pilots are permitted to fly choppers and jets. This will enfore a more dedicated role. Thanks Share this post Link to post Share on other sites
BlackSheep 0 Posted March 10, 2007 Moin moin, Create a trigger Activation: BLUFOR,OPFOR ...what ever you need multiple Condition: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">!isNull driver NameHeli On Aktivation: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if(typeOf driver NameHeli != "SoldierWPilot" )then{driver NameHeli action["Eject",NameHeli]; hint "You are not qualified!"} Work's great for me Share this post Link to post Share on other sites
fer 21 Posted March 11, 2007 MeNeZ, There is a script in BAS f (see http://www.flashpoint1985.com/cgi-bin....=59444) which allows you to define authorised players for vehicles with a single line (per vehicle) in the init.sqf file. This will also give a warning message in English / German / Czech / Polish or Russian, depending on the players' language settings. - Fer <TZW> Share this post Link to post Share on other sites
nuxil 2 Posted March 11, 2007 i use this to force out a non pilot.. for [{_a=0},{_a<1},{_a=_a}] do { _vehicle= ( _this select 0 ); _class=typeof (crew _vehicle select 0); if ( (crew _vehicle select 0) == driver _vehicle ) then { if ( _class != "SoldierEPilot") then { (crew _vehicle select 0) action ["GETOUT", _vehicle]; }; }; sleep 1; }; Then in the init fiead of the aircraft put: blah=[this] execvm "PilotOrNot.sqf" this checks if ther is a russian pilot in the aircraft,, i would guess SoldierWPilot is for usa. Share this post Link to post Share on other sites
MeNeZ 0 Posted March 22, 2007 @Fer Can you please repost the link to the script you are talking about? When I try go there is says I must login even tho I am. Then I login again and it says that same again... Or could you please post the script here?? Thanks Share this post Link to post Share on other sites
sickboy 13 Posted March 22, 2007 Moin moin,Create a trigger Activation: BLUFOR,OPFOR ...what ever you need multiple Condition: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">!isNull driver NameHeli On Aktivation: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if(typeOf driver NameHeli != "SoldierWPilot" )then{driver NameHeli action["Eject",NameHeli]; hint "You are not qualified!"} Work's great for me  Do not use this as it is in it's form in the post.... If you still want to use the trigger, change the OnActivation to: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if((local driver NameHeli) && (typeOf driver NameHeli != "SoldierWPilot"))then{driver NameHeli action["Eject",NameHeli]; hint "You are not qualified!"} If you do not add the local check, you will get issues in Multiplayer with A) every client executing the Eject... Have seen weird situations with 25 Parachutes coming out of a Harrier when we were with 25 players etc. B) Lags and desyncs noticed after A) happened I would recommend going for BAS-F or another scripting solution Share this post Link to post Share on other sites
nuxil 2 Posted March 22, 2007 Why are you using "EJECT" ? what if a soldier with a parashoot tryes to fly the heli? use GETOUT instead Share this post Link to post Share on other sites
misinformed 0 Posted March 22, 2007 Why are you using "EJECT" ? what if a soldier with a parashoot tryes to fly the heli? use GETOUT instead It wont matter, Everyone has a parachute, even that farmer 3 doors on the right. Until the choppers flying eject wont deploy a parachute. Share this post Link to post Share on other sites
ThePredator 0 Posted March 22, 2007 Not true for the harrier... Share this post Link to post Share on other sites
sickboy 13 Posted March 22, 2007 Why are you using "EJECT" ? what if a soldier with a parashoot tryes to fly the heli? Â use GETOUT instead I have not considered anything else than simply resolving the issue with these triggers used inside MultiPlayer. Eject or Get Out, it should only be executed once, and then only on the Computer where the player is local. Share this post Link to post Share on other sites
Heatseeker 0 Posted March 22, 2007 The eject think seems a little exagerated, like the helicopter throws you out saying: "GTFO!! You're not my pilot!" How about removing the fuel instead? Share this post Link to post Share on other sites
fer 21 Posted March 22, 2007 Can you please repost the link to the script you are talking about? When I try go there is says I must login even tho I am. Then I login again and it says that same again... Please go to here I don't know why the original link was not working. If you get really stuck, simply go straight to the appropriate page on the BAS site at: http://www.ballisticaddonstudios.com/content/view/73/57/ Share this post Link to post Share on other sites
Maddmatt 1 Posted March 22, 2007 The eject think seems a little exagerated, like the helicopter throws you out saying: "GTFO!! You're not my pilot!" How about removing the fuel instead? So then not being a pilot makes the fuel magically vanish? It's better to kick them out, also stops morons from sitting in the pilot seat and hogging it - and also from firing the weapons. Instead of using triggers, why not use the "getin" eventhandler? Less strain on the CPU and it is faster to react. Share this post Link to post Share on other sites
fer 21 Posted March 22, 2007 The script used in BAS f automatically ejects the unauthorized person, and delivers a message (locally) that informs the player s/he is not authorized to act as a pilot. Incidentally, the message is automatically translated into Czech, German, Russian or Polish (as well as English). Another good reason to use BAS f Share this post Link to post Share on other sites
MeNeZ 0 Posted March 23, 2007 I named my chopper, "little1" and then noted the names of the pilots nearby. Then I edited the init.sqf file with the following: little1 addEventhandler ["GetIn", {[_this,[E13,E14]] execVM "f\common\f_isAuthorisedCrew.sqf"}]; Then I added to the init field of the chopper: this exec "f_AuthorisedCrew.sqf" I try to get in as a solder but I dont get a msg and I dont get kicked out either... Any ideas? Share this post Link to post Share on other sites
Rambo-16AAB 0 Posted March 30, 2007 Following this thread with interest. got a question though. Does the BAS-F script work with respawning players & vehicles ? Share this post Link to post Share on other sites
nominesine 0 Posted March 31, 2007 I always do it like this (simplified and without syntax): 1) Each time someone enters the vehicle a script starts. 2) It checks wether the driver is a qualified pilot or not (as been mentioned above) 3) If not, then the fuel of the aircraft is set to zero (and the player is informed by a local hint that he/she can not operate the vehicle). 4) If the driver is a qualified pilot the fuel level is set to full (or whatever it was before a non qualified pilot entered the cockpit). That way I don't have to force someone to eject from a vehicle. An unqualified pilot can still hide inside the vehicle, and fire it's guns etc. Share this post Link to post Share on other sites
-DirTyDeeDs--Ziggy- 0 Posted March 31, 2007 The script used in BAS f automatically ejects the unauthorized person, and delivers a message (locally) that informs the player s/he is not authorized to act as a pilot. Incidentally, the message is automatically translated into Czech, German, Russian or Polish (as well as English). Another good reason to use BAS f I tried the BAS f framework just to play with the unauthorized person script. Works as described for me, that means anyone can use it. your pdf manual conveniently acts as a tutorial of sorts for mission editing, thanks. I named my chopper, "little1" and then noted the names of the pilots nearby.Then I edited the init.sqf file with the following: little1 addEventhandler ["GetIn", {[_this,[E13,E14]] execVM "f\common\f_isAuthorisedCrew.sqf"}]; Then I added to the init field of the chopper: this exec "f_AuthorisedCrew.sqf" I try to get in as a solder but I dont get a msg and I dont get kicked out either... Any ideas? My suggestion is to remove the sentence from the vehicle init field. I didnt I add anything to the vehicles init and it worked for me, as long as the units were properly named and defined in the eventhandler line in the init.sqf Share this post Link to post Share on other sites
fer 21 Posted March 31, 2007 MeNeZ, Are you trying to extract the script from the BAS f mission folder and place it in your own mission folder? If so, some things to bear in mind: 1. Make sure you have the same folder structure (/f/common/..) etc. 2. Copy across the file 'stringtable.csv' as well (it has the messages in it). 3. For your init.sqf file, copy the relevant block from the init.sqf file in the BAS f folder. 4. Edit the block from (3) as per instructions in the BAS f manual. If you are still having issues please post again. Good luck! - Fer <TZW> Share this post Link to post Share on other sites
MeNeZ 0 Posted April 1, 2007 Thanks for your advice but its still not working for some reason. I copied the authorised crew check script & the stringtable to my mission folder. After that I copied that edited line into my init.sqs file. Should I have something in my init field on the chopper? Share this post Link to post Share on other sites
-DirTyDeeDs--Ziggy- 0 Posted April 1, 2007 I named my chopper, "little1" and then noted the names of the pilots nearby.Then I edited the init.sqf file with the following: little1 addEventhandler ["GetIn", {[_this,[E13,E14]] execVM "f\common\f_isAuthorisedCrew.sqf"}]; Then I added to the init field of the chopper: this exec "f_AuthorisedCrew.sqf" I try to get in as a solder but I dont get a msg and I dont get kicked out either... Any ideas? My suggestion is to remove the sentence from the vehicle init field. I didnt add anything to the vehicles init and it worked for me, as long as the units were properly named and defined in the eventhandler line in the init.sqf Share this post Link to post Share on other sites