# Installation Instructions

1. Make sure you have [**yarn**](https://github.com/citizenfx/cfx-server-data/tree/master/resources/%5Bsystem%5D/%5Bbuilders%5D/yarn) in your ***resources*** folder.<br>
2. Download ***cs-stories*** and place it in your ***resources*** folder.<br>
3. Add ***ensure cs-stories*** to your server's configuration file before ensuring your phone.<br>
4. Edit your phone's ***\_\_resource.lua*** or ***fxmanifest.lua*** file and add *'**@cs-stories/client/hooks/core.lua'*** as the last client script and *'**@cs-stories/server/hooks/core.lua'*** as the last server script.<br>
5. Edit your phone's NUI file (usually ***index.html***) and add ***\<script type="text/javascript" src="nui://cs-stories/client/hooks/core.js">\</script>*** right before ***\</body>***.<br>
6. Check the ***config.lua*** file inside ***cs-stories*** for further configuration and **read through all options and their comments** and adjust them to your setup and preferences.<br>
7. Given you're using the internal solution, open the **required port** (by default **35540**; **incoming** - **inbound**) in your firewall on **TCP** protocol.<br>
8. Run the command ***refresh*** and the command ***ensure cs-stories***.<br>
9. If your phone uses an animation loop you may need to edit it (usually found in an ***animation.lua*** file) and add a ***not CS\_STORIES.ACTIVE*** check before playing an animation to ensure an animation glitch does not occur when the video call camera is opened.<br>
10. Ensure your phone.


---

# 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://fivem-docs.gitbook.io/critical-scripts/cs-stories/installation-instructions.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.
