Page cover

Config

Full View config.lua

Preview File Updated: v1.0.1 - 24.03.2024

Config = {}
-- Client Trigger: "tosun_spawnselector:open"
-- Client Export: exports['tosun_spawnselector']:OpenSpawnSelector


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

Config.Distance = 45

Config.Notification = function(message, time, type)
    if type == "error" then
        --exports['tosun_notify']:Notification('SPAWN SELECTOR', message, time, '#f52a2a', 'fa-solid fa-map-pin')
        -- ESX.ShowNotification(message)
         QBCore.Functions.Notify(message, 'error', time)
    end
end

Config.Translate = {
    ['cannot_spawn_on_dead'] = "Your previous game ended in death, you must be reborn in the last location.",
    ['cannot_spawn_on_fastlyrejoin'] = "You have just left your previous game, you must respawn in the last location."

}

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

Config.WeatherSync = "qb-weathersync" -- "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

---------------- Do not touch these codes unless you know what you are doing.  --------------------------
Config.lefttimelastposition = false  -- can only spawn in the last position if it has re-entered the game sooner than the time you set
Config.lefttimelastpositiontime = 15 --MİNUTES just let it appear in the last position only if it re-enters in how many minutes
---------------------- https://tosun.gitbook.io/tsn/spawn-selector/installation/last-time-last-location --------------------------------------

Config.Spawns = {
    [1] = {
        camCoords = vector3(-1238.31, -204.93, 42.11),
        spawnCoords = vector4(-1227.55, -197.13, 39.17, 120.68),
        label = "Crestenburg Hotel",
    },
    [2] = {
        camCoords = vector3(1151.57, -627.64, 65.27),
        spawnCoords = vector4(1127.14, -645.29, 55.79, 281.89),
        label = "Mirror Park",
    },
    [3] = {
        camCoords = vector3(-1011.8, -2714.38, 23.61),
        spawnCoords = vector4(-1037.8, -2737.82, 19.17, 325.98),
        label = "Airport",
    },
    [4] = {
        camCoords = vector3(-1249.22, -1469.2, 10.6),
        spawnCoords = vector4(-1265.34, -1481.28, 3.33, 286.73),
        label = "Beach",
    },
    [5] = {
        camCoords = vector3(1113.8, 2680.31, 46.42),
        spawnCoords = vector4(1138.84, 2672.44, 37.13, 89.32),
        label = "Sandy Shores",
    },
    [6] = {
        camCoords = vector3(176.68, 6555.92, 43.24),
        spawnCoords = vector4(159.59, 6587.62, 31.12, 187.2),
        label = "Paleto Bay",
    },
}

Last updated