# Configuration

### # CONFIGRATIONS <a href="#configrations" id="configrations"></a>

```
-- █▀▀ █▀▀ █▄░█ █▀▀ █▀█ ▄▀█ █░░
-- █▄█ ██▄ █░▀█ ██▄ █▀▄ █▀█ █▄▄
Config.Framework = "auto" 
-- Determines which framework to use: auto, esx, or qb
Config.Fahrenheit = false 
-- it is true it will use Fahrenheit, if false it will use degrees.
Config.TestCommand = "spawn" -- false or command_name
--If you want to use a command to open the spawn menu during the test phase, fill in here
Config.DeadLastPosition = true 
-- if it's dead, it can only continue at the last location.
```

```
-- █▀ █▀█ ▄▀█ █░█░█ █▄░█ █▀   ▄▀█ █▀█ █▀▀ ▄▀█
-- ▄█ █▀▀ █▀█ ▀▄▀▄▀ █░▀█ ▄█   █▀█ █▀▄ ██▄ █▀█
Config.SpawnMenu = {
    [1] = {
        label = "Pillbox Hospital",
        --What will appear as the name on the menu
        coord = vector4(293.14, -604.37, 43.32, 56.06),
        -- Where will the character spawn
        dec = "Pillbox Hill Medical Center, a key hospital in Los Santos, provides advanced healthcare services. It’s a hub for treating injuries, emergencies, and supporting the city’s residents.",
        -- what will it say in the description?
        img = "./img/hospital.png", -- url or file
        -- What will be the image on the menu?
        nearby = {
            [1] = "fa-solid fa-shirt", -- https://fontawesome.com/v6/search?o=r&m=free
            [2] = "fa-solid fa-capsules", -- https://fontawesome.com/v6/search?o=r&m=free
            [3] = "fa-solid fa-basket-shopping", -- https://fontawesome.com/v6/search?o=r&m=free
        }
        -- This may sound a bit complicated, but the logic is very good.
        -- Where it wants to spawn, the player can see if there are things like markets and garages!
        -- You can add any emoji you want from fontawesome.
    },
    -- etc.
}
```

## FUNCTIONS

```
function getFramework()
    if Config.Framework == "esx" then
        return exports['es_extended']:getSharedObject(), "esx"
    elseif Config.Framework == "qb" then
        return exports["qb-core"]:GetCoreObject(), "qb"
    elseif Config.Framework == "auto" then
        if GetResourceState('qb-core') == 'started' then
            return exports["qb-core"]:GetCoreObject(), "qb"
        elseif GetResourceState('es_extended') == 'started' then
            return exports['es_extended']:getSharedObject(), "esx"
        end
    end
end
-- If you are using a custom freamwork through here, you can enter the export here!

function SpawnLoad()
    TriggerServerEvent('QBCore:Server:OnPlayerLoaded')
    TriggerEvent('QBCore:Client:OnPlayerLoaded')
    TriggerServerEvent('qb-houses:server:SetInsideMeta', 0, false)
    TriggerServerEvent('qb-apartments:server:SetInsideMeta', 0, 0, false)
end
-- If there is something you want to happen when the character spawns, you can enter it here!

```


---

# 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://debux.gitbook.io/untitled/scripts/spawn-selector/configuration.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.
