# Setup

## Installation

* Follow the instructions below to run the `gusti-deathscreen` script on your server
* Extract file
* Copy / Cut `gusti-deathscreen` into your server's resources folder
* Open server.cfg
* Add the `gusti-deathscreen` script by ensure `gusti-deathscreen` in server.cfg
* Restart server
* Finished
* Now you can enjoy the features of the `gusti-deathscreen` script on your server

## Usage

#### TriggerEvent

{% tabs %}
{% tab title="OnDeathScreen" %}
```lua
TriggerEvent('gusti-deathscreen:OnDeathScreen', duration)
```
{% endtab %}

{% tab title="OffDeathScreen" %}
```lua
TriggerEvent('gusti-deathscreen:OffDeathScreen', duration)
```
{% endtab %}
{% endtabs %}

#### Exports

{% tabs %}
{% tab title="OnDeathScreen" %}
```lua
exports['gusti-deathscreen']:OnDeathScreen(duration)
```
{% endtab %}

{% tab title="OffDeathScreen" %}
```lua
exports['gusti-deathscreen']:OffDeathScreen(duration)
```
{% endtab %}
{% endtabs %}

#### Example

```lua
RegisterCommand('testdeath', function()
    -- 120 seconds = 02:00 (minute)
    exports['gusti-deathscreen']:OnDeathScreen(120)
end)

RegisterCommand('hidedeath', function()
    exports['gusti-deathscreen']:OffDeathScreen()
end)
```
