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
  1. Scripts
  2. Spawn Selector

Installation

PreviousSpawn SelectorNextConfiguration

Last updated 4 months ago

# SCRIPT INSTALLATION

  • Download ox-lib script ()

  • Extract the files and drag the files to the resources section of your server

  • add ensure ox_lib under freamwork in server.cfg

  • Add ensure debux-spawn under ox_lib

First, let's know the triggers needed to access the menu!

Exports

Server Side

TriggerClientEvent("debux-spawn:OpenSpawn", source)

Client Side

TriggerEvent("debux-spawn:OpenSpawn")

qb-Multicharacter

  • Open qb-multicharacter > server > main.lua

  • Find this place and then replace it with this

RegisterNetEvent('qb-multicharacter:server:loadUserData', function(cData)
    local src = source
    if QBCore.Player.Login(src, cData.citizenid) then
        repeat
            Wait(10)
        until hasDonePreloading[src]
        print('^2[qb-core]^7 '..GetPlayerName(src)..' (Citizen ID: '..cData.citizenid..') has successfully loaded!')
        QBCore.Commands.Refresh(src)
        loadHouseData(src)
        if Config.SkipSelection then
            local coords = json.decode(cData.position)
            TriggerClientEvent('qb-multicharacter:client:spawnLastLocation', src, coords, cData)
        else
            TriggerClientEvent("debux-spawn:OpenSpawn", src)
        end
        TriggerEvent("qb-log:server:CreateLog", "joinleave", "Loaded", "green", "**".. GetPlayerName(src) .. "** (<@"..(QBCore.Functions.GetIdentifier(src, 'discord'):gsub("discord:", "") or "unknown").."> |  ||"  ..(QBCore.Functions.GetIdentifier(src, 'ip') or 'undefined') ..  "|| | " ..(QBCore.Functions.GetIdentifier(src, 'license') or 'undefined') .." | " ..cData.citizenid.." | "..src..") loaded..")
    end
end)

esx_multicharacter

  • Open esx_multicharacter > client > main.lua

  • find this place and then replace it with this

TriggerServerEvent('esx:onPlayerSpawn')
TriggerEvent('esx:onPlayerSpawn')
TriggerEvent('playerSpawned')
TriggerEvent('esx:restoreLoadout')
TriggerEvent("xox-spawn:OpenSpawn")
Characters, hidePlayers = {}, false
https://github.com/overextended/ox_lib