> For the complete documentation index, see [llms.txt](https://savana.gitbook.io/savanascripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://savana.gitbook.io/savanascripts/scripts/spawn-selector/installation.md).

# Installation

{% hint style="info" %}
**How to install?**

* Unzip the downloaded file.
* Move the "savana-spawnselector" file to your resources folder.
* Set cfg.core = 'yourframework' and other settings..
* Set locations from config.
* Set events. (Read me)
* Restart your server.
  {% endhint %}

{% hint style="warning" %}
Read Me
{% endhint %}

{% hint style="warning" %}

```
If your infrastructure is qb-core and you are using qb-apartments, please put the spawn trigger in the comment line or delete it.

The example is as below.

RegisterNetEvent('apartments:client:setupSpawnUI', function(cData)
    QBCore.Functions.TriggerCallback('apartments:GetOwnedApartment', function(result)
        if result then
            TriggerEvent('qb-spawn:client:setupSpawns', cData, false, nil)
            --TriggerEvent('qb-spawn:client:openUI', true)
            TriggerEvent("apartments:client:SetHomeBlip", result.type)
        else
            if Apartments.Starting then
                TriggerEvent('qb-spawn:client:setupSpawns', cData, true, Apartments.Locations)
                --TriggerEvent('qb-spawn:client:openUI', true)
            else
                TriggerEvent('qb-spawn:client:setupSpawns', cData, false, nil)
               --TriggerEvent('qb-spawn:client:openUI', true)
            end
        end
    end, cData.citizenid)
end)



-- events
-- those events uses for opening spawnselector

exports["savana-spawnselector"]:open()
TriggerEvent("savana-spawnselector:OpenMenu") 
TriggerClientEvent("savana-spawnselector:OpenMenu", src)
```

{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://savana.gitbook.io/savanascripts/scripts/spawn-selector/installation.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.
