> For the complete documentation index, see [llms.txt](https://buty-documentation.gitbook.io/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://buty-documentation.gitbook.io/home/guides/license-system/export-integration.md).

# EXPORT INTEGRATION

1. To use this license script with any **AutoSchool, Boat School system or script that you want to grant the license, you have to add the following export:**

```lua
-- @param identifier - player identifier
-- @param type - license type ( driving, weapon or any other valid license from the config )
-- @param vehicletype - vehicle type ( none, car, truck, motorcycle, boat, plane, helicopter )

exports['Buty-license']:AddLicense('identifier', 'type', 'vehicletype')
```

* &#x20;<mark style="background-color:red;">**identifier**</mark>**&#x20;** - player identifier
* &#x20;<mark style="background-color:orange;">**type**</mark> - license type ( **driving, weapon or any other valid license from the config** )
* &#x20;<mark style="background-color:blue;">**vehicletype**</mark> - vehicle type ( **none** (in case it is not a driver's license.)**, car, truck, motorcycle, boat, plane, helicopter** )

2. To **delete** any license, whether it's for a police system or whatever, you should **add this export:**

```lua
-- @param identifier - player identifier
-- @param type - license type ( driving, weapon or any other valid license from the config )
-- @param vehicletype - vehicle type ( none, car, truck, motorcycle, boat, plane, helicopter )

exports['Buty-license']:RemoveLicense('identifier', 'type', 'vehicletype')
```

* &#x20;<mark style="background-color:red;">**identifier**</mark>**&#x20;** - player identifier
* &#x20;<mark style="background-color:orange;">**type**</mark> - license type ( **driving, weapon or any other valid license from the config** )
* &#x20;<mark style="background-color:blue;">**vehicletype**</mark> - vehicle type ( **none** (in case it is not a driver's license.)**, car, truck, motorcycle, boat, plane, helicopter** )

3. The following export is used to **detect if a player has the license or not**. *For example, for a gun store to open only if you have a gun license, etc. You must add this export in the script you want.*

```lua
exports['Buty-license']:CheckLicense("type", "vehicletype", function(result)
    if result then
    -- Here you will add the script function. What you want it to do if you DO have the licenses.
        print("Has the license.")
    else
    -- Here you will add the script function. What you want it to do if you do NOT have the licenses.
        print("Doesn't have the license.")
    end
end)
```

* &#x20;<mark style="background-color:blue;">**vehicletype**</mark> - vehicle type ( **none** (in case it is not a driver's license.)**, car, truck, motorcycle, boat, plane, helicopter** )
* &#x20;<mark style="background-color:orange;">**type**</mark> - license type ( **driving, weapon or any other valid license from the config** )

<br>
