> For the complete documentation index, see [llms.txt](https://s-service.gitbook.io/s-service-documentations/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://s-service.gitbook.io/s-service-documentations/docs-for-our-products-v1/s-hud/exports-and-events.md).

# Exports and Events

You need specific Exports or Events for your Scripts? Here is your way to go!

{% hint style="info" %}
<https://github.com/Chrisi816/Code-Beispiele-S-Service> for code examples
{% endhint %}

{% tabs %}
{% tab title="Client Exports" %}
Open a Interaction Notify with a specific key and message

<pre class="language-lua"><code class="lang-lua"><strong>exports["S-HUD"]:MakeHelpNotify(Key, message)
</strong></code></pre>

Make a Team Notify for your Team chat

```lua
exports["S-HUD"]:MakeTeamNotify(name, message, length)
```

Make a Info Notify.&#x20;

```lua
exports["S-HUD"]:MakeNotifyInfo(category, titel, message, length,name)
```

`category:` 1 = "info"; 2 = "success"; 3 = "error"; 4 = "ooc"; Either number or word can be used. Name is only used for OOC.\
`titel:` Titel that should be displayed. \
`message:` The message that should be delivered\
`length:` The length of the message in seconds\
`name:` The name that should be shown in a ooc notify

Make a server announce for a player

```lua
exports["S-HUD"]:MakeAnnounce(message,category,name, length)
```

`category:`1 = "server"; 2 = "event"; 3 = "police"; 4 = "medic"; 5 = "faction"; Either number or word can be used\
`name:` Name that should be displayed on the Announce\
`lenght:` In Seconds

Make a progressbar in ms

<pre class="language-lua"><code class="lang-lua"><strong>exports["S-HUD"]:MakeProgressbar(text,length)
</strong></code></pre>

Open a Text UI&#x20;

```lua
exports["S-HUD"]:ShowTextUI(key, text)
```

Close a Text UI&#x20;

```lua
exports["S-HUD"]:HideTextUI()
```

Make the HUD visible

<pre class="language-lua"><code class="lang-lua"><strong>exports["S-HUD"]:OpenHUD()
</strong></code></pre>

Make the HUD invisible

<pre class="language-lua"><code class="lang-lua"><strong>exports["S-HUD"]:CloseHUD()
</strong></code></pre>

Enable/Disable the cinema mode for a player

<pre class="language-lua"><code class="lang-lua"><strong>exports["S-HUD"]:ControlCinemaMode()
</strong></code></pre>

Shows every Notify that is available

<pre class="language-lua"><code class="lang-lua"><strong>exports["S-HUD"]:DisplayEverything()
</strong></code></pre>

To integrate your own Food and Thirst System

<pre class="language-lua"><code class="lang-lua"><strong>exports["S-HUD"]:MakeFoodAndThirst(thirstpercent, hungerpercent)
</strong></code></pre>

Change the postition of an HUD element from left to right, or right to left. "1" = left, "2" = left

<pre class="language-lua"><code class="lang-lua"><strong>exports["S-HUD"]:PosHandler(id, number)
</strong></code></pre>

Sets the Range of the Voice. Used for own Voice system integration

<pre class="language-lua"><code class="lang-lua"><strong>exports["S-HUD"]:SetRange(mode)
</strong></code></pre>

Remove an active Progressbar&#x20;

```lua
exports["S-HUD"]:DestroyProgressBar()
```

Force HUD Status Visible/Hidden

```lua
exports["S-HUD"]:ForceHudStatus(bool) // bool: true = Hidden / false = Visible
```

{% endtab %}

{% tab title="Server Exports" %}
Resets positioning data in the Databse for a player

<pre class="language-lua"><code class="lang-lua"><strong>exports["S-HUD"]:ResetDatabaseValues()
</strong></code></pre>

Saves the positioning data. Data example is available in Javascript&#x20;

```lua
exports["S-HUD"]:SaveValues(data)
```

{% endtab %}

{% tab title="Client/Server Events" %}

## Interaction Notify

```lua
TriggerEvent("SService:Client:TriggerHelpNotify", Key, message)
TriggerClientEvent("SService:Client:TriggerHelpNotify", source, Key, message)
```

## Admin Notify

```lua
TriggerEvent("SService:Client:TeamNotify", name, message, length)
TriggerClientEvent("SService:Client:TeamNotify", source,name, message, length)
```

## Notify

Make a Info Notify.  Either number or word can be used

{% code overflow="wrap" %}

```lua
TriggerEvent("SService:Client:MakeInfoNotify", category, titel, message, length,name)
TriggerClientEvent("SService:Client:MakeInfoNotify", source, category, titel, message, length, name)
```

{% endcode %}

`source:` Player ID\
`category:` 1 = "info"; 2 = "success"; 3 = "error"; 4 = "ooc"; Either number or word can be used. Name is only used for OOC.\
`titel:` Titel that should be displayed. \
`message:` The message that should be delivered\
`length:` The length of the message in seconds\
`name:` The name that should be shown in a ooc notify

## Progressbar

```lua
TriggerEvent("SService:Client:MakeProgressbar", helptext, length)
TriggerClientEvent("SService:Client:MakeProgressbar", source, helptext, length)
```

## Announce

{% code overflow="wrap" fullWidth="false" %}

```lua
TriggerEvent("SService:Client:MakeAnnounce2", message, category, name)
TriggerClientEvent("SService:Client:MakeAnnounce2", source, message, category, name,length)
```

{% endcode %}

`source:` Player ID\
`category:`1 = "server"; 2 = "event"; 3 = "police"; 4 = "medic"; 5 = "faction"; Either number or word can be used\
`name:` Name that should be displayed on the Announce\
`lenght:` In Seconds

{% endtab %}
{% endtabs %}

{% hint style="info" %}
If you need a Export that is not listed above, feel free to open a ticket at our Discord, so that we can implement your new Export in no time!&#x20;
{% endhint %}
