Debux Workshop
TebexDiscord
  • Debux Documentation
  • Infos
    • Discord customer role
    • Get the update
    • Escrow & Open Source
  • Scripts
    • Multicharacter
      • Installation
      • Configuration
    • Spawn Selector
      • Installation
      • Configuration
    • Crew & Family
      • Configuration
      • Installation
Powered by GitBook
On this page
  • # CONFIGRATIONS
  • FUNCTIONS
  1. Scripts
  2. Spawn Selector

Configuration

# CONFIGRATIONS

-- █▀▀ █▀▀ █▄░█ █▀▀ █▀█ ▄▀█ █░░
-- █▄█ ██▄ █░▀█ ██▄ █▀▄ █▀█ █▄▄
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!
PreviousInstallationNextCrew & Family

Last updated 4 months ago