# Crate actions (Final messages, broadcasting)

## Final Messages

Final messages are messages that are sent once the crate finishes opening, usually showcasing that a player has opened a crate and received specific x1,x2,x3 items. There are two types of possible final message showcasing - **public and private.**

**Public Final Messages -** Everyone receives the customized final message. Configuration used for this is "Final\_Message"

**Private Final Messages -** Only the crate opener receives the customized final message. Configuration used for this is "FinalMessageToOpener"

Final Message feature has 3 placeholders, 2 dedicated to showcasing the won rewards and one used for showcasing the crate openers username (%player\_name%).

Reward placeholders:\
{ColoredReward:rewardNumber} - used to keep the original colouring of the won reward's item name. Replace rewardNumber with the appropriate numeric value. Each number corresponds to the sequential position of the reward that was won.

<figure><img src="/files/esR1bmGt3qy2kjUjSqwb" alt=""><figcaption><p>Final message example</p></figcaption></figure>

YAML code example:

```yaml
Final_Message: #These can be used on all crates
- '&a&lAMC &7&l� &a{player_name} &7has opened a &a&lJanuary &a&lCrate&7:'
- '&2&lNormal Rewards:' #{ColoredReward:rewardNumber} is used for items original colouring 
- '&a1) &f{ColoredReward:1}' #{Reward:rewardNumber} is used for items name without any colors
- '&a2) &f{ColoredReward:2}'
- '&a3) &f{ColoredReward:3}'
- '&a4) &f{ColoredReward:4}'
- '&a5) &f{ColoredReward:5}'
- '&a6) &f{ColoredReward:6}'
- '&a7) &f{ColoredReward:7}'
- '&a8) &f{ColoredReward:8}'
- '&7'
- '&2&lFinal Rewards:'
- '&a1) &f{ColoredReward:best}'
- '&3Get yourself a crate also at: &cstore.example.com'
```

## Commands

**CommandOnCratePlace -** configuration used to set up specific commands to be executed on the moment of placing the crate. Placeholder used %player% %player\_name%

## Messages

**MessagesToPlayer -** configuration used to set up specific messages to the crate opener on the moment of placing the crate


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pm2plugins.gitbook.io/advancedcrates/crate-configurations/crate-actions-final-messages-broadcasting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
