✨SLEEK SPAWN SELECTOR

Here check the installation guide

This script is compatible with ESX and QB.

This script is compatible with QB-Apartments, QB-Houses, Quasar Housing and PS-Housing.

INSTALLATION GUIDE

  1. Download from KEYMASTER and Unzip the forge-spawn.pack.zip and place this folder in your server's resource folder.

  2. Add the resource to your server start config: ensure forge-spawn,the name of the folder must not be changed or the resource will not function correctly. It should be located just below your core.

  3. Delete or remove from your resources folder any other Spawn Selector you have, such as qb-spawn.

  4. Clear the cache of your server and also of your own FiveM.

  5. Reboot the entire server with the forge script well ensured in your server.cfg.

If you are ESX or QB you will only have to put the script forge-spawn ensured in your server and configure it to your liking.

If you use another Multicharacter that you need to add an export that opens the Spawn System, this is the export that opens it:

  • CLIENT SIDE ONLY:

exports["forge-spawn"]:open() -- this will open the spawn menu

CONFIG

The following will explain all the settings, one of the most important things that I recommend you spend a few minutes to understand in order to offer your users the best possible experience.

If you use the latest update of the script it will automatically detect everything regarding Framework, Skin Manager and Identifier. Don't touch anything where it says "You don't need to touch this".

Config = {}

--  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—
-- β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β• β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘
-- β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘
-- β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘
-- β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘
--  β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β• β•šβ•β•  β•šβ•β•β•β•β•šβ•β•     β•šβ•β• β•šβ•β•β•β•β•β•  β•šβ•β•β•β•β•β• β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•β•šβ•β• β•šβ•β•β•β•β•β• β•šβ•β•  β•šβ•β•β•β•
-- GENERAL                                 
---@type 'ESX'|'QBCore'|'none'                                                                    
Config.framework = GetResourceState('es_extended') == "started" and "ESX" or GetResourceState('qb-core') == "started" and "QBCore" or "none" -- You don't have to touch this

---@type string? a replacement for the default resource name
Config.resourceName = nil -- set the resource name of ESX or QB here, in case you changed it, if not you can set it to nil

---@type boolean
Config.ignoreOnFirstSpawn = true -- This will make the first SPAWN your character does when you create it, not bring up the SPAWN menu

---@type boolean
Config.useApartments = (GetResourceState("qb-apartments") == "started")
    or (GetResourceState("ps-housing") == "started")
    or false -- You don't have to touch this

---@type vector3 where the player will spawn if they created a new character. This will only be used, if Config.ignoreOnFirstSpawn is set to true
Config.firstSpawn = vector3(-1037.5580, -2737.6663, 20.1693)

---@type 'qb-houses'|'qs-housing'|'ps-housing'|'none'?
Config.housing =
    (GetResourceState('qb-houses') == "started" and "qb-houses")
or  (GetResourceState('qs-housing') == "started" and "qs-housing")
or  (GetResourceState('ps-housing') == "started" and "ps-housing")
or  "none" -- You don't have to touch this

-- INTERFACE
Config.color = "#00c5ff" -- color of the ui
Config.volume_hover = 20 -- sound on button hover; set to 0 if there should be no sound (between 0 and 100)
Config.volume_teleport = 20 -- sound on button hover; set to 0 if there should be no sound (between 0 and 100)

---@type Dictionary<string, string> translations
Config.translations = {
    ["teleport_to_last_location"] = "TELEPORT TO LAST LOCATION",
    ["teleport"] = "TELEPORT",
    ["top_description"] = "Welcome to the Spawn Selector where you can choose where you want to spawn",
    ['house_description_text'] = "Your house / appartment"
}

---@type Dictionary<string, string> images
---used for images for the appartments
---['address'] = 'path/to/image.png' ('address') can be found in database
---['default'] is the image that should be used in case the address was not yet added to this list and shold not be removed
Config.images = {
    ["default"] = "./assets/images/north-city.png"
}

---@type 'zooming_stars'|'sky_cam'
Config.transitionType = "sky_cam" -- "zooming_stars" / "sky_cam" the tpye of transition you want to use
Config.skyCamWaitTime = 2500 -- time in ms the sky cam will wait before transitioning back to the player view
Config.skyCamTransitionTime = 2000 -- time in ms the sky cam transition into the player view will take
Config.UseAntiEvasion = true -- If true, while you are dead you will not be able to choose a location other than "LAST LOCATION"
Config.lowPerformanceMode = false -- If you put true here. All UI animations will be removed, so there's no possible LAG. This lowers the aesthetics and beauty of the system
Config.particles = true -- If you put false here, it means there will be no particles or dark background. If you think it looks too dark when creating a character, set it to false here. This lowers the aesthetics and beauty of the system
-- SPAWN SETTINGS
---@type Dictionary<string, NAMESPACE.META.SpawnPoint[]>
Config.spawnPoints = {

    ["unemployed"] = { -- will be visible to everyone
        {
            name = "North Station", -- name of the spawn 
            description = "Visit the North and its charms",-- a desctiption of the spawn
            image = "./assets/images/north-station.png", -- image of the spawn
            position = vector3(-427.65, 6029.05, 31.49) -- vector3 / table{x: number, y: number, z: number}
        },
        {
            name = "Airport", -- name of the spawn
            description = "Nothing special, just the airport of the city",-- a desctiption of the spawn
            image = "./assets/images/airport.png", -- image of the spawn
            position = { -- postion (can be reiceived over tx-admin ingame menu)
                x = -1037.5580,
                y = -2737.6663, 
                z = 20.1693
            }
        },
        {
            name = "North of City", -- name of the spawn 
            description = "Visit the north of the city. There are some trendy venues and bars",-- a desctiption of the spawn
            image = "./assets/images/north-city.png", -- image of the spawn
            position = { -- postion (can be reiceived over tx-admin ingame menu)
                x = -191.69,  
                y = 283.76, 
                z = 92.82
            }
        },
        {
            name = "Military Base", -- name of the spawn 
            description = "A little weird stop... who am I to judge you",-- a desctiption of the spawn
            image = "./assets/images/military-base.png", -- image of the spawn
            position = { -- postion (can be reiceived over tx-admin ingame menu)
                x = -2573.58, 
                y = 2320.38, 
                z = 33.06
            }
        },
        {
            name = "Harmony Motel", -- name of the spawn 
            description = "What better than a night in a motel?",-- a desctiption of the spawn
            image = "./assets/images/harmony-motel.png", -- image of the spawn
            position = { -- postion (can be reiceived over tx-admin ingame menu)
                x = 1111.94, 
                y = 2650.22, 
                z = 38.0
            }
        }
    },

    --[[
    ["taxi"] = { -- will only be visible to players with the 'taxi' job
        {
            name = "Taxi Station",
            description = "Get your taxi and make some money.",
            image = "./assets/images/taxi-station.png",
            position = {
                x = 900.3630, 
                y = -171.6680,
                z = 74.0756
            }
        }
    },
    
    ["police"] = { -- will only be visible to players with the 'police' job
        {
            name = "Central Police Station",
            description = "Go to work as a policeman and earn money",
            image = "./assets/images/police-station.png",
            position = { 
                x = 413.83, 
                y = -988.85,
                z = 29.42
            }
        }
    },
    ]]

-- Add more, as many as you want, just copy and paste

}

If you want to edit the aesthetics or design. You have the HTML open so you can modify the style and everything as you want.

The script is RESPONSIVE for all resolutions as well.

Last updated