Home   Help Search Login Register  

Author Topic: only pilot s can fly  (Read 977 times)

0 Members and 1 Guest are viewing this topic.

Offline sharkattack

  • Former Staff
  • ****
only pilot s can fly
« on: 19 Apr 2008, 12:30:30 »
hi
how can i lock aircraft to all but pilots   ???
many thanks

edit
====
found  a script to do it  .. but cant get it working

script by mandoble

Code: [Select]
// Only pilots.sqf
// Only pilots piloting

_vehicle = _this select 0;
_pilotstypes = ["SoldierWPilot", "BISCamelPilot", "SoldierEPilot", "BISCamelPilot2"];
_driver = objNull;

while {damage _vehicle < 0.5} do
{
   _driver = driver _vehicle;
   if (!isNull _driver) then
   {
      if (!((typeOf _driver) in _pilotstypes)) then
      {
         _driver action ["GETOUT", _vehicle];
      };
   };   
   Sleep 1;
};

and in init field of chopper i have

nul= [] execVM "onlypilots.sqf" 

anyone tell me what im doing wrong   as anyone is still able to fly the chopper
« Last Edit: 19 Apr 2008, 12:55:23 by shark attack »
"HOLY SARDINE" - see Shark-Attack meet his match

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: only pilot s can fly
« Reply #1 on: 19 Apr 2008, 13:01:28 »

nul= [this] execVM "onlypilots.sqf" 

Offline sharkattack

  • Former Staff
  • ****
Re: only pilot s can fly
« Reply #2 on: 19 Apr 2008, 13:02:51 »
thank you   :good:
"HOLY SARDINE" - see Shark-Attack meet his match