Scripts
um-spawn

um-spawn

  • Select your framework

Framework

  • Make sure your qb-core version are not old

Installation

Firstly

Multicharacter

  • open config.lua > find spawnEventUI and replace event um-spawn:client:startSpawnUI
spawnEventUI = 'um-spawn:client:startSpawnUI'

Config (Important ones)

house and apartment settings are always important

  • adjust it according to your own preferences
um = {}
 
um.debug = false
 
um.lang = 'en' -- tr,en,es,zh,fr,hi [or add locales > .lua]
 
--  If you want the apartment start for new player, set it to true.
-- ?If you make it true, new user does not have an apartment, you force them to choose an apartment
um.forceApartmentStart = true
 
um.property = {
    apartments = {
        status = true, -- If you want to show the apartment system, set it to true.
        script = 'qb', -- qb, qbx , ps
    },
    houses = {
        status = true, -- If you want to show the house system, set it to true.
        script = 'qb', -- qb, qbx , ps , qs , nolag, bcs
    }
}
 
-- If you want to show the xmas icon, set it to true or hidden false
um.xmas = {
    status = true,
    url = 'https://cdn.discordapp.com/attachments/1165113646616154162/1184498469034000384/gingerbread-man.png',
}
 
um.main = {
    camera = {
        radius = 2.0, -- Camera distance from the character
        angle = 50, -- Camera angle
        point = 0.1, -- Camera point
        turning = true, -- If you want to turn the camera, set it to true.
        skyspawnPos = -20, -- -100 vertical, -20 horizontal
    },
    ped = {
        status = false, -- Make it true if you want your character to see and walk the path
    },
    bookmark = {
        status = true, -- If you want to show the bookmark system, set it to true.
        money = {
            free = false, -- If you want to bookmark the free money, set it to true.
            amount = math.random(1000, 10000) or 500
        }
    },
    map = true, -- If you want to show other locations [paleto etc], set it to true.
}
 
--[[
   If your hud appears in spawn menu,
   this is nonsense, remember that hud is not shown without playerLoaded or LocalPlayer loaded,
   but that's ok, that's what this function was made for
--]]
um.hud = function(bool)
    if bool then
        -- Example: exports['myhud']:SetDisplay(false)
        Debug('Hud is hidden', 'debug')
    else
        -- Example: exports['myhud']:SetDisplay(true)
        Debug('Hud is show', 'debug')
    end
end
 
um.weather = {
    sync = false, -- If you want to sync the weather, set it to true.
    sc = 'qb', -- cd , qb
    type = 'XMAS', -- https://docs.fivem.net/docs/game-references/weather-types/
    time = 23, -- 0 - 23
}
 
um.coords = {
    ['motel'] = {
        coords = vector4(313.23, -236.72, 53.99, 68.11),
        street = 'Meteor St',
        text = 'Motel St'
    },
    ['hospital'] = {
        coords = vector4(286.42, -602.82, 43.19, 128.92),
        street = 'Elgin Ave Del Perro Fwy',
        text = 'Hospital Ave'
    },
    ['police'] = {
        coords = vector4(400.46, -979.54, 29.39, 270.35),
        street = 'Sinner St Atlee St',
        text = 'Police Station'
    },
    ['sandy'] = {
        coords = vector4(1421.33, 3601.24, 34.85, 297.93),
        street = 'Algonquin Blvd',
        text = 'Sandy Shore'
    },
    ['paleto'] = {
        coords = vector4(-131.32, 6390.86, 31.5, 34.13),
        street = 'Paleto Blvd',
        text = 'Paleto Bay'
    }
}

Server.cfg

đź’ˇ

um-spawn should always ensure after things like apartments and houses scripts.

ensure oxmysql
ensure ox_lib
--------------
ensure qb-core
ensure [qb]
ensure [standalone]
--------------
ensure um-spawn

You have completed the installation âś…

Apartments

  • If you want to organise apartments bridge > apartments > coords.lua
 
if not um.property.apartments.status then return end
 
UM_apartments = {
    ['SouthRockfordDrive'] = {
        type = 'apartment1',
        coords = vector4(-693.8, -1089.88, 13.69, 247.9),
        text = 'South Rockford Drive',
        image = 'https://cdn.discordapp.com/attachments/1082006975212163092/1200206312693313547/SouthRockfordDrive.png',
        features = {
            beds = '2 bd',
            bath = '2 ba',
            sqft = '2,300 sqft'
        },
        desc = 'An upscale dwelling featuring modern amenities and a desirable location, ideal for professionals and city enthusiasts.',
        star = 4,
        tag = "rent"
    },
    ['MorningwoodBlvd'] = {
        type = 'apartment2',
        coords = vector4(-1254.77, -404.6, 34.57, 124.53),
        text = 'Morningwood Blvd',
        image = 'https://cdn.discordapp.com/attachments/1082006975212163092/1200206311950909490/MorningwoodBlvd.png',
        features = {
            beds = '2 bd',
            bath = '2 ba',
            sqft = '1,800 sqft'
        },
        desc = 'A luxurious and prestigious residence, offering the finest amenities and a prime location for those who demand the best in urban living.',
        star = 5,
        tag = "rent"
    },
    ['IntegrityWay'] = {
        type = 'apartment3',
        coords = vector4(224.52, -625.15, 40.46, 248.28),
        text = 'Integrity Way',
        image = 'https://cdn.discordapp.com/attachments/1082006975212163092/1200206306091470848/IntegrityWay.png',
        features = {
            beds = 'Studio',
            bath = '1 ba',
            sqft = '1,100 sqft'
        },
        desc = 'A comfortable and well-maintained apartment, offering a balance between convenience and affordability.',
        star = 3,
        tag = "rent"
    },
    ['TinselTowers'] = {
        type = 'apartment4',
        coords = vector4(-617.55, 5.74, 41.85, 359.29),
        text = 'Tinsel Towers',
        image = 'https://cdn.discordapp.com/attachments/1082006975212163092/1200206313246965792/TinselTowers.png',
        features = {
            beds = '1 bd',
            bath = '1 ba',
            sqft = '2,200 sqft'
        },
        desc = 'An upscale dwelling featuring modern amenities and a desirable location, ideal for professionals and city enthusiasts.',
        star = 5,
        tag = "rent"
    },
    ['FantasticPlaza'] = {
        type = 'apartment5',
        coords = vector4(311.69, -1080.13, 29.4, 100.58),
        text = 'Fantastic Plaza',
        image = 'https://cdn.discordapp.com/attachments/1082006975212163092/1200206305399406632/FantasticPlaza.png',
        features = {
            beds = 'Studio',
            bath = '1 ba',
            sqft = '800 sqft'
        },
        desc = 'A basic residence that provides essential amenities, suitable for those who prioritize budget over luxury.',
        star = 3,
        tag = "rent"
    },
}

Event

  • Event to access or open the spawn menu
TriggerEvent('um-spawn:client:startSpawnUI')