# FIRST STEPS (READ FIRST)

{% hint style="warning" %}
:exclamation: PLEASE READ THIS IN FULL :exclamation:

Properly reading and following this guide can prevent you from running into several issues that would be easily fixed

That said, if you do have any questions regarding setup we are more than happy to help in a ticket in the [discord](https://discord.gg/envi-scripts) server
{% endhint %}

## <mark style="color:purple;">RESOURCES</mark>

Our Scripts use Envi-Bridge to automatically detect Frameworks, Inventories, Zone and Target Resources - due to this we need to ensure that the bridge and any Envi-Scripts resources are started after these dependencies.

{% hint style="info" %}
Only our Non-Standalone scripts use Envi-Bridge. Anything that's Standalone will be labeled as such in both Tebex and this documentation. If you're **only** setting up a standalone script then you can skip the steps related to Envi-Bridge, as you will not receive this script in your CFX Portal
{% endhint %}

Correct Load Order:

* Compatible Framework
* ox\_lib
* Compatible Inventory Resource
* Compatible Target Resource
* All other resources
* envi-bridge
* Any other Envi Resource<br>

{% hint style="info" %}
Before you start any specific Envi script:

* Upload the **full** resource folder from your download
* Keep every packaged UI folder that ships with the resource
* Do **not** build or compile any web UI yourself
* Start every dependency listed in that script's `fxmanifest.lua` before the script itself
* Only rename a resource if that script's docs explicitly say it is safe
  {% endhint %}

## STEP-BY-STEP

* Step 1: Check you have compatible Framework/Inventory/Target/Zones resources in your server (see compatibility: <https://envi-scripts-organization.gitbook.io/documentation/compatibility>)
* Step 2: Download `envi-bridge` and `envi-[scriptName]` from Cfx.re Portal (<https://portal.cfx.re> )
* Step 3: Navigate to your `resources` folder
* Step 4: Create a folder and name it `[envi]`
* Step 5: Go inside the `[envi]` folder and create another folder called `[0]` - This will ensure that the resources in the folder start first
* Step 6: Extract your `envi-bridge` resource from the download and place this inside the `[0]` folder
* Step 7: Navigate back to the main `[envi]` folder
* Step 8: Extract your `envi-[scriptName]` resource from the download and place this inside the `[envi]` folder
* Step 9: Find the main `server.cfg` in your server where your resources are started
* Step 10: At the bottom of your resources (after your `framework` / `[standalone]` folders etc.) - Add the line `ensure [envi]`

### Extra checks

* If a asset download ships audio, models, or other assets, make sure those are also installed.
* If a script has extra dependency lines in `fxmanifest.lua`, follow that order as well as the global order above
* If the docs mention inventory items, you still need to register those items in your own framework

These steps will help you make sure that everything is starting in the correct order!

<figure><img src="/files/F8bPTfoyGmHuArBSdNT4" alt=""><figcaption><p>Base setup</p></figcaption></figure>

<figure><img src="/files/FmK5rpYUvgiogVTy9D8e" alt=""><figcaption><p>Envi Setup</p></figcaption></figure>


---

# 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://envi-scripts-organization.gitbook.io/documentation/premium-scripts/first-steps-read-first.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.
