Jump to content

Pilot Ranks and Aircraft usage restrictions?


AustinWilliams

Recommended Posts

Hi all,

My apologies if this is hidden somewhere here, but I was wondering if somewhere it would be possible to edit the code and restrict usage on aircraft depending on your pilot rank. Without this, I don't see much point to even having pilot ranks available aside from the pretty badge you get to wear. 

For example, I've got two ranks; First Officer and Second Officer. I would only like the FO's to be able to operate the 737's in our fleet, while I would like the SO's to be able to operate the 737's and 747's.

Any way this would be possible or am I missing something?

Cheers,

Austin.

Link to comment
Share on other sites

  • Administrators

Hey, welcome.

Right now, it's not possible in the stock install. But it's a good idea. IIRC, someone had implemented that a while ago (if you do a search), in their template, to only show certain aircraft to certain ranks.

It's relatively "easy" to do, and I can post the code on how to do it, if people want. It's really just a few lines added to the PIREP form. But, that restriction will only be on manual PIREPs. Doing ACARS PIREPs is a bit tricky, because I can't restrict what they fly, or what gets sent to/from ACARS in terms of PIREPs, that's why I never implemented it (for instance, XAcars doesn't even send an aircraft type). But it's very simple to add it in the manual PIREP form, if that's what you're looking for.

Link to comment
Share on other sites

Too bad there wasn't a way to only display flights on the schedule page that the pilot is currently ranked to fly.  They have to be able to bid on the flight first before they fly.  If they were unable to even see the higher class flights, it would have the same effect.  Also, this way they wouldn't waste their time flying a flight only to have it rejected by the system.

Link to comment
Share on other sites

  • Administrators

Too bad there wasn't a way to only display flights on the schedule page that the pilot is currently ranked to fly.  They have to be able to bid on the flight first before they fly.  If they were unable to even see the higher cl!@#$ flights, it would have the same effect.  Also, this way they wouldn't waste their time flying a flight only to have it rejected by the system.

You can do that, basically the same way as the PIREP aircraft form, in schedule_results.tpl, after the "foreach($allroutes as $route) {" lines:

if(Auth::LoggedIn())
{
   if(Auth::$userinfo->rank == 'New Hire')
   {
      // Skip any B747-400 flights if they're a "New Hire" rank
      if($route->aircraft == 'B747-400')
      {
         continue; // This will tell it to skip and move to the next route
      }
   }
}

It's not very "automatic", but this is really long-winded to do through the admin panel, and every VA does it differently I guess. but it's relatively easy to add in

Link to comment
Share on other sites

  • 2 months later...

Instead of restricting the pireps, it may be easier to restrict the downloads of the planes.

So pilot X can only be able to download aircraft planes in his/her rank. Just an idea.

Very good point, but it don't stop them from dloading that type of aircraft somewhere and using it.

This is a cool idea if it was optional to use on a va site. I just think as nabeel has pointed out, there are many ways around the code.

Link to comment
Share on other sites

  • 3 years later...
  • 2 weeks later...
  • Moderators

I know this post is old, i did not find anything: is there a way to restrict typeratings by creating Groups instead of ranks?

I wrote a module for someone that they create a type like "B738" and all the B738 aircraft will be restriceted as long as they have the same ICAO as "B738". :)

You can check it out at my website "Module Test/try out center-admin/add ons/Aircraft Permit". So you need to create a type like "A320" then you go to pilots/edit and hit the "aircraft permit" and give permit or remove permit to that particular pilot. Now if you have let's say 4 "A320" all 4 will be restricted once you create that type in the first page but they all have to have the same ICAO as "A320". :D

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...