# CONFIGURATION FILE

```lua

Config = {}

-- Client Trigger: "janiel_spawn:open"
-- Client Export: exports['janiel_spawn']:OpenSpawnMenu


Config.Core = "QB-Core" -- "ESX" / "QB-Core"
Config.CoreExport = function()
    if Config.Core == "ESX" then
        return exports['es_extended']:getSharedObject()
    elseif Config.Core == "QB-Core" then
        return exports['qb-core']:GetCoreObject()
    end
end

Config.Notification = function(message, time, type)
    if type == "error" then
      --   exports['janiel-notify']:Notify(text, texttype, length)
        QBCore.Functions.Notify(message, 'error', time)
    end
end

Config.Translate = {
    ['cannot_spawn_on_dead'] = "This is unconsciously, you need to be revived in the last place."
}

Config.Hud = {
    Enable = function()
        -- exports['hud']:DisplayHud(true)
    end,
    Disable = function()
        -- exports['hud']:DisplayHud(false)
    end
}

Config.WeatherSync = "cd_easytime" -- "cd_easytime", "qb-weathersync", "vSync"
Config.Weather = 'CLEAR' -- weather type
Config.Time = {hour = 20, minutes = 0}

Config.OnDeadOnlyLastPosition = true -- When the player is dead, should he be able to be reborn only in the previous location or can he be reborn in any location

Config.Spawns = {
    [1] = {
        camCoords = vector3(1999.51, 3729.37, 50.05),
        spawnCoords = vector4(1991.62, 3771.75, 32.18, 203.39),
        label = "Sandy Shores",
        address = "Gas station",
        image = "sandy_route68.jpg"
    },
    [2] = {
        camCoords = vector3(176.68, 6555.92, 43.24),
        spawnCoords = vector4(159.59, 6587.62, 31.12, 187.2),
        label = "Paleto Bay",
        address = "Great Ocean Hwy",
        image = "paleto_bay.JPG" -- image
    },
    [3] = {
        camCoords = vector3(400.88, -945.50, 48.83),
        spawnCoords = vector4(417.42, -986.77, 29.40, 90.44),
        label = "Mission Row",
        address = "Police Departmant",
        image = "mrpd.JPG" -- image
    },
    [4] = {
        camCoords = vector3(-86.33, -1123.33, 38.59),
        spawnCoords = vector4(-62.23, -1099.50, 26.34, 120.18),
        label = "Premium Deluxe",
        address = "Motorsport",
        image = "gallery.JPG" -- image
    },
    [5] = {
        camCoords = vector3(-1903.92, -1238.56, 34.14),
        spawnCoords = vector4(-1840.02, -1212.40, 13.02, 147.89),
        label = "Del Perro Beach ",
        address = "Pearls Restaurant",
        image = "pearls.JPG" -- image
    },
    [6] = {
        camCoords = vector3(246.04, -611.49, 61.14),
        spawnCoords = vector4(297.12, -602.21, 43.30, 71.04),
        label = "Pillbox Hill ",
        address = "Hospital",
        image = "pillbox.JPG" -- image
    },
}


Config.DefaultSpawn = {
    x = -1035.71,
    y = -2731.87,
    z = 12.86,
    w = 0.0
}


Config.LoadTimeout = 15000

```

```lua
RegisterNetEvent("janiel_spawnselector:WeatherSync")
AddEventHandler("janiel_spawnselector:WeatherSync", function(boolean)
    if boolean then
        Wait(150)
        if Config.WeatherSync == 'cd_easytime' then
            TriggerEvent('cd_easytime:PauseSync', true)
        elseif Config.WeatherSync == 'qb-weathersync' then
            TriggerEvent('qb-weathersync:client:DisableSync')
        elseif Config.WeatherSync == 'vSync' then
            TriggerEvent('vSync:toggle', false)
            Wait(100)
            TriggerEvent('vSync:updateWeather', Config.Weather, false)
        end
        Wait(50)
        NetworkOverrideClockTime(Config.Time.hour, Config.Time.minutes, 0)
        ClearOverrideWeather()
        ClearWeatherTypePersist()
        SetWeatherTypePersist(Config.Weather)
        SetWeatherTypeNow(Config.Weather)
        SetWeatherTypeNowPersist(Config.Weather)
    else
        Wait(150)
        if Config.WeatherSync == 'cd_easytime' then
            TriggerEvent('cd_easytime:PauseSync', false)
        elseif Config.WeatherSync == 'qb-weathersync' then
            TriggerEvent('qb-weathersync:client:EnableSync')
        elseif Config.WeatherSync == 'vSync' then
            TriggerEvent('vSync:toggle', true)
            Wait(100)
            TriggerServerEvent('vSync:requestSync')
        end
    end
end)

```


---

# 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://janiel.gitbook.io/janiel-resources/janiel-docs/spawn-selector/configuration-file.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.
