# Aviation

> A flight school and pilot contracts in one resource, paid by how well you land.

- URL: https://xexstudio.com/scripts/aviation
- Resource name: `xex_aviation`
- Category: Gameplay
- Price: €29.99
- Frameworks: ESX, QBCore, Qbox
- Source: Cfx.re escrow
- Version: 2.0.2
- Measured resmon: 0.00 ms idle · 0.01 ms tablet open
- Requires: ox_lib, oxmysql, esx_license (ESX only)
- Delivery: instant, through Cfx.re Keymaster
- Documentation: https://xexstudio.com/docs/aviation
- Video: https://www.youtube.com/watch?v=CxAB0u3oeBs

## Highlights
- Flight school with a theory test and helicopter and plane exams
- Four contract types, each landing scored from S to F and paid by grade
- Ranks, flight hours and a logbook, all checked and paid on the server

Flying on a roleplay server should be something players get better at. They earn their licenses at the flight school with a theory test and two practical exams, then take contracts from the Flight Ops desk: passenger flights, VIP charters, mountain rescues and Cargobob sling loads.

Every landing gets a score from the vertical speed at touchdown and the bounces, plus how close to the center of the pad for helicopters. The grade, from S to F, multiplies the pay. Pilots rank up, unlock bigger aircraft and keep a logbook of their flights. The server spawns the aircraft, checks every stage against its real position and calculates every payment.

## Features
- Theory test with random questions from an editable bank, graded on the server
- Helicopter exam (hover, circuit, pad landing) and plane exam (circuit, airport landing)
- Minimum landing score, damage and time limit per exam, all configurable
- Scheduled passenger flights (round trip), VIP charters, air rescue against the clock and Cargobob sling loads
- Landing score from the vertical speed at touchdown, bounces and helipad accuracy, with a landing report
- Pay by distance, landing grade, rescue time bonus, cargo condition and rank bonus
- Ranks that unlock aircraft classes and contract types, flight hours and a logbook
- Flightpad tablet with the contracts board, the school and the pilot profile
- In-flight HUD with the next stage, distance, timer, altitude and vertical speed
- Co-pilot share of every payment
- Aircraft rent with a refundable deposit, minus damage
- Aircraft spawned by the server and every stage checked against its real position
- School or contracts can be turned off; contracts work with another school's licenses
- License names configurable to keep the ones your players already have
- Admin command to add airfields, stands and helipads from the game
- Server exports and events for battle passes, logs or your anticheat
- Brand name and accent color of the UI configurable, English and Spanish

## Changelog
### 2.0.2
- Repackaged release, same code as 2.0.1
### 2.0.1
- Large aircraft no longer cancel a contract when they take long to load
- Planes need a wider free stand before spawning
### 2.0.0
- Pilot Jobs rewritten from scratch and merged with a new flight school
- Landing score with grades that multiply the pay
- Ranks, flight hours, logbook and co-pilot share
- Flightpad tablet and in-flight HUD
- Qbox support alongside ESX and QBCore, server-side checks for every stage

## FAQ
### Can I use the contracts with my own flight school?
Yes. Turn the school off in the config and put your school's license names in the license settings.
### Can players use their own aircraft?
No. Exams and contracts use aircraft spawned by the server, so the route and the payment can be checked.
### Can I add more airports and helipads?
Yes. An admin command prints each position ready to paste into the data files. Every airport with a parking spot becomes a destination.
### Does it replace Pilot Jobs?
Yes. Aviation is the new version of Pilot Jobs. Keep your old license names in the config and players keep their licenses.
