# Exports

## Exports (client):

<mark style="color:$primary;">-- NOTIFY EXPORT --</mark>&#x20;

@title = Title Message : string&#x20;

@message = Subtitle Message : string&#x20;

@sort = notify-sort : "info", "success", "warn", "error" : string&#x20;

@time = showing-time in msec : 1000 = 1sec : number

```lua
exports['Moon_Hud']:notify(title, message, sort, time)
```

<mark style="color:$primary;">-- ANNOUNCE EXPORT --</mark>&#x20;

@title = Announce-Title : string&#x20;

@message = Subtitle Message : string&#x20;

@time = showing-time in msec : 1000 = 1sec : number

```lua
exports['Moon_Hud']:announce(title, message, time)
```

<mark style="color:$primary;">-- PRESS E EXPORT --</mark>&#x20;

@title = Press-E-Title : string&#x20;

@letter = Press-E-Letter : string

> You can call the pressE with max wait time of \~200 msec.

```lua
exports['Moon_Hud']:pressE(title, letter)
```

<mark style="color:$primary;">-- OPEN REQUEST EXPORT --</mark>&#x20;

@title = Request-Title : string&#x20;

@message = Request-Message : string&#x20;

@time = wait time until request automatic closed (msec) : number : 1000 = 1sec&#x20;

@callback = callback function : function

> if the player accept the request, the callback function will be called with true, else with false.

```lua
exports['Moon_Hud']:openRequest('Hud-Showcase', 'Do you want to test something?', 5000, function(accepted)
    print('Accepted: ', accepted)
end)
```

<mark style="color:$primary;">-- SHOW HUD EXPORT --</mark>

```lua
exports['Moon_Hud']:showHud()
```

<mark style="color:$primary;">-- HIDE HUD EXPORT --</mark>

```lua
exports['Moon_Hud']:hideHud()
```

Use these exports to show or hide the HUD based on the function called. Use `showHud` to display the HUD and `hideHud` to hide it.

<mark style="color:$primary;">-- Show no voice chat connected screen --</mark>&#x20;

@show = show or hide : boolean

```lua
exports['Moon_Hud']:showVoiceChat(show)
```

## Exports (server):

<mark style="color:$primary;">-- ANNOUNCE EXPORT --</mark>&#x20;

@title = Announce-Title : string&#x20;

@message = Subtitle Message : string&#x20;

@time = showing-time in msec : 1000 = 1sec : number

```lua
exports['Moon_Hud']:announce(title, message, time)
```

<mark style="color:$primary;">-- NOTIFY EXPORT --</mark>&#x20;

@id = Player ID&#x20;

@title = Title Message : string&#x20;

@message = Subtitle Message : string&#x20;

@sort = notify-sort : "info", "success", "warn", "error" : string&#x20;

@time = showing-time in msec : 1000 = 1sec : number

```lua
exports['Moon_Hud']:notify(id, title, message, time)
```

## Events (client):

<mark style="color:$primary;">-- NOTIFY EVENT --</mark>&#x20;

@title = Title Message : string&#x20;

@message = Subtitle Message : string&#x20;

@sort = notify-sort : "info", "success", "warn", "error" : string&#x20;

@time = showing-time in msec : 1000 = 1sec : number

```lua
TriggerEvent('Moon_Hud:notify', title, message, sort, time)
```
