Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Authorisedscript  (Read 1927 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: