# Boat Licenses

> A boating school with a theory test, a jet ski exam and a boat exam that ends with a scored docking.

- URL: https://xexstudio.com/scripts/boat-licenses
- Resource name: `xex_marine`
- Category: Gameplay
- Price: €19.99
- Frameworks: ESX, QBCore, Qbox
- Source: Cfx.re escrow
- Version: 1.0.0
- Measured resmon: 0.00 ms idle · 0.02 ms in an exam
- Requires: ox_lib, oxmysql, OneSync, esx_license (ESX only)
- Delivery: instant, through Cfx.re Keymaster
- Documentation: https://xexstudio.com/docs/boat-licenses
- Video: https://www.youtube.com/watch?v=U3h_328R2BM

## Highlights
- Docking scored by the server from the boat's position, heading and impact, with a grade from S to F
- Slow zones and collisions checked by the server every second, not by the client
- ESX, QBCore and Qbox, with ox_target or qb-target at the instructor

The client never decides whether an exam was passed. The server spawns the boat, checks every buoy against its real
position, measures speed in the slow zones and damage once per second, and scores the docking from where the boat
stopped, how it lines up with the berth and how hard it hit. Players see the result in a docking report with a grade.

It runs on ESX, QBCore and Qbox, and the tablet, the tests and the exam HUD take your server's name and colors.

## Features
- Theory test with random questions, corrected on the server (the answers never reach the client)
- Jet ski exam through the harbor slow zone and a buoy course
- Boat exam on the same course, ending in a berth with a docking score from 0 to 100
- Faults for speeding in a slow zone and for collisions, with a configurable tolerance
- Exam boat spawned by the server, every buoy checked against its real position
- Exam HUD with the next buoy, distance, time left, speed in knots, the zone limit and faults
- Academy tablet with exams, licenses, best docking grade and exam history
- Instructor NPC with an ox_target or qb-target option, or a marker and [E] prompt
- /marinetool to measure new buoys, slow zones, berths and spawn points
- Exports to check, grant and revoke licenses, and events for logs and other resources
- Brand name and accent color, English and Spanish, everything editable in the config

## Changelog
### 1.0.0
- First public release
- Theory test, jet ski exam and boat exam with a scored docking
- Faults, docking score and licenses checked on the server
- ESX, QBCore and Qbox through an open bridge

## FAQ
### Can I use my server's existing boat license names?
Yes. Set them in Config.Licenses and the script grants and checks those names.
### Can I move the school or change the course?
Yes. The desk is in the config and the routes are in data/routes.lua. /marinetool prints the lines to paste.
### Can I turn off the jet ski exam?
Yes. Each practical exam can be disabled, and each one needs the theory license first.
### Is the fee refunded if a player fails?
No, failing or cancelling uses up the attempt. It is refunded if the boat cannot be spawned.
### Does it work without a target resource?
Yes. Without ox_target or qb-target the desk uses a marker and an [E] prompt.
