# Exports

## ShowHint - Used to display simple Hint

{% code overflow="wrap" %}

```lua
-- title: string
-- description: string
-- color: string
exports['coachHint']:ShowHint(title, description, color)

-- EXAMPLE
exports['coachHint']:ShowHint('Delivery Job', 'Go to Los Santos Airport to pickup delivery package', 'red')
```

{% endcode %}

## ShowHintCoords - Used to display Hint that shows distance to coords

{% code overflow="wrap" %}

```lua
-- title: string
-- description: string
-- coords: vector3
-- distance: float
-- autoClose: boolean
-- color: string
-- returns: 'y' or 'c' | 'y' when player reached destination coords (playerCoords - coords < distance) | 'c' when Hint was closed
local result = exports['coachHint']:ShowHintCoords(title, description, coords, distance, autoClose, color)

-- EXAMPLE
local result = exports['coachHint']:ShowHintCoords('Taxi Job', 'Pickup client from Groove Street', vector3(157.05, 670.72, 49.50), 4.0, true, 'green')
if result == 'y' then
    print('you reached your destination')
elseif result == 'c' then
    print('you cancelled your task')
end
```

{% endcode %}

## ShowHintWithPoints - Used to display Hint with points for example: 0/15

{% code overflow="wrap" %}

```lua
-- title: string
-- description: string
-- maxPoints: number
-- startingPoints: number
-- autoClose: boolean
-- customIcon: string
-- color: string
-- returns: 'y' or 'c' | 'y' when player reached destination coords (playerCoords - coords < distance) | 'c' when Hint was closed
local result = exports['coachHint']:ShowHintWithPoints(title, description, maxPoints, startingPoints, autoClose, customIcon, color)

-- EXAMPLE
local result = exports['coachHint']:ShowHintWithPoints('Delivery', 'Deliver 15 packages to marked locations', 15, 0, true, 'inventory')
if result == 'y' then
    print('you delivered 15 packages')
elseif result == 'c' then
    print('you cancelled your task')
end
```

{% endcode %}

## HideHint - Used to close current Hint

{% code overflow="wrap" %}

```lua
-- EXAMPLE
exports['coachHint']:HideHint()
```

{% endcode %}

## IsHintVisible - Used to check if Hint is currently visible on screen

{% code overflow="wrap" %}

```lua
-- returns: boolean | 'true' if Hint is visible, 'false' if Hint is not visible
exports['coachHint']:IsHintVisible()

-- EXAMPLE
if exports['coachHint']:IsHintVisible() then
    print('Hint is currently visible')
else
    print('His is currently not visible')
end
```

{% endcode %}

## GetHintPoints - Used to get current Hint points progress

{% code overflow="wrap" %}

```lua
-- returns: number | number of current Hint points
exports['coachHint']:GetHintPoints()

-- EXAMPLE
local points = exports['coachHint']:GetHintPoints()
print('Player has currently ' .. points .. ' points')
```

{% endcode %}

## GetHintMaxPoints - Used to get maximum Hint points

{% code overflow="wrap" %}

```lua
-- returns: number | number of current Hint max points
exports['coachHint']:GetHintMaxPoints()

-- EXAMPLE
local maxpoints = exports['coachHint']:GetHintMaxPoints()
print('Player has currently ' .. maxpoints .. ' max points')
```

{% endcode %}

## GetHintDistance - Used to get current player distance to Hint destination coords

{% code overflow="wrap" %}

```lua
-- returns: float | distance (in kilometers) from player to his current Hint destination
exports['coachHint']:GetHintDistance()

-- EXAMPLE
local distance = exports['coachHint']:GetHintDistance()
print('player is now ' .. distance .. ' km from his Hint destination')
```

{% endcode %}

## ChangeHintTitle - Used to change current Hint title

```lua
-- title: string
exports['coachHint']:ChangeHintTitle(title)

-- EXAMPLE
exports['coachHint']:ChangeHintTitle('New Title')
```

## ChangeHintDescription -  Used to change current Hint description

{% code overflow="wrap" %}

```lua
-- title: string
exports['coachHint']:ChangeHintDescription(description)

-- EXAMPLE
exports['coachHint']:ChangeHintDescription('This is new Hint description')
```

{% endcode %}

## ChangeHintColor - Used to change Hint color

{% code overflow="wrap" %}

```lua
-- newColor: string
exports['coachHint']:ChangeHintColor(newColor)

-- EXAMPLE
exports['coachHint']:ChangeHintColor('orange')

```

{% endcode %}

{% hint style="info" %}
Supported colors:&#x20;

* *<mark style="color:purple;">**purple**</mark>*
* *<mark style="color:green;">**green**</mark>*
* *<mark style="color:blue;">**blue**</mark>*
* *<mark style="color:orange;">**orange**</mark>*
* *<mark style="color:red;">**red**</mark>*
  {% endhint %}

## UpdateHintPoints - Used to set new Hint points

{% code overflow="wrap" %}

```lua
-- points: number
exports['coachHint']:UpdateHintPoints(points)

-- EXAMPLE
local maxPoints = exports['coachHint']:GetHintMaxPoints()
local newPoints = maxPoints - 1
exports['coachHint']:UpdateHintPoints(newPoints)
print('Hint points changed to maxPoints - 1')
```

{% endcode %}

## AddHintPoints - Used to add points to Hint points

{% code overflow="wrap" %}

```lua
-- points: number
exports['coachHint']:AddHintPoints(points)

-- EXAMPLE
exports['coachHint']:AddHintPoints(1)
print('Added 1 Hint point')
```

{% endcode %}
