# Cooldowns

{% hint style="warning" %}
**SERVER FUNCTIONS**
{% endhint %}

## add\_cooldown

Adds a cooldown for a player or globally.

#### Parameters

* source: `number`
* cooldown\_type: `string`
* duration: `number`
* is\_global: `boolean`

```lua
bdtk.add_cooldown(source, cooldown_type, duration, is_global)
```

***

## check\_cooldown

Checks if a cooldown is active.

#### Parameters

* source: `number`
* cooldown\_type: `string`
* is\_global: `boolean`

#### Returns

* `boolean`

```lua
bdtk.check_cooldown(source, cooldown_type, is_global)
```

***

## clear\_cooldown

Clears a specific cooldown.

#### Parameters

* source: `number`
* cooldown\_type: `string`
* is\_global: `boolean`

```lua
bdtk.clear_cooldown(source, cooldown_type, is_global)
```

***

## clear\_expired\_cooldowns

Clears all expired cooldowns.

```lua
bdtk.clear_expired_cooldowns()
```

***

## clear\_resource\_cooldowns

Clears all cooldowns for a given resource.

#### Parameters

* resource: `string`

```lua
bdtk.clear_resource_cooldowns(resource)
```
