# Rewarded

{% hint style="info" %}
There are some advertisement settings in the `playgama-bridge-config.json` file

[playgama-bridge-config](https://wiki.playgama.com/playgama/sdk/playgama-bridge-config "mention")
{% endhint %}

**Rewarded ads** are a type of advertisement where players have the option to watch an ad in exchange for in-game rewards

Offer players rewards in exchange for watching ads, incentivizing ad engagement and increasing ad revenue.

#### Is Rewarded Supported

Check if the platform supports displaying rewarded ads.

```gdscript
Bridge.advertisement.is_rewarded_supported
```

#### Rewarded Ad State <a href="#rewarded-a-d-state" id="rewarded-a-d-state"></a>

Monitor the state of the rewarded ad to manage the reward process.

```gdscript
Bridge.advertisement.rewarded_state
```

Returns the current state of the rewarded ad. Possible values: `loading`, `opened`, `closed`, `rewarded`, `failed`.

{% tabs %}
{% tab title="Godot 3.x" %}

<pre class="language-gdscript"><code class="lang-gdscript"><strong># To track rewarded ad state changes, connect to the signal
</strong>func _ready():
    Bridge.advertisement.connect("rewarded_state_changed", self, "_on_rewarded_state_changed")

func _on_rewarded_state_changed(state):
    print(state)
</code></pre>

{% endtab %}

{% tab title="Godot 4.x" %}

<pre class="language-gdscript"><code class="lang-gdscript"><strong># To track rewarded ad state changes, connect to the signal
</strong>func _ready():
    Bridge.advertisement.connect("rewarded_state_changed", Callable(self, "_on_rewarded_state_changed"))

func _on_rewarded_state_changed(state):
    print(state)
</code></pre>

{% endtab %}
{% endtabs %}

{% hint style="info" %}
React to changes in ad state. For example, mute the game sound when the state is `opened` and unmute when the state is `closed` or `failed`.
{% endhint %}

{% hint style="danger" %}
Reward the player only when the state is `rewarded.`
{% endhint %}

#### Rewarded Placement <a href="#show-rewarded-a-d" id="show-rewarded-a-d"></a>

Monitor the current placement of the rewarded ad to manage the reward process.

```gdscript
Bridge.advertisement.rewarded_placement
```

#### Show Rewarded Ad <a href="#show-rewarded-a-d" id="show-rewarded-a-d"></a>

Display a rewarded ad and provide incentives to players for watching the entire ad.

```gdscript
var placement = "test_placement" # optional
Bridge.advertisement.show_rewarded(placement)
```
