Home   Help Search Login Register  

Author Topic: Authorisedscript  (Read 1238 times)

0 Members and 1 Guest are viewing this topic.

Offline 70gunner

  • Members
  • *
Authorisedscript
« on: 21 May 2007, 23:45:56 »
Currently looking for the an authorisation script for the use of any vehicle.

Only pilots can fly
crewmembers can only use driver/gunner/commanderseat in armor

Can somebody point me inthe right direction.

Thanks in advance

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Authorisedscript
« Reply #1 on: 22 May 2007, 00:02:19 »
Try running this script in the init field of each vehicle you want to proctect.
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;
};

Offline 70gunner

  • Members
  • *
Re: Authorisedscript
« Reply #2 on: 23 May 2007, 07:46:17 »
Thx working like it should  :good: