Additional Informations
Page dedicated to Additional Informations about our Spawn Selector [V2].
Core Features
Developer API (Events & Hooks)
-- CLIENT-SIDE
-- Opens the spawn selector UI
-- @param isNew boolean - Indicates if the player is a brand new character.
-- (Set to true to filter out features like 'last location' and paid spawns for new characters)
local isNewCharacter = false
TriggerEvent('qf_spawnselector_v2:open', isNewCharacter)-- SERVER-SIDE
-- Listen for player spawn selection completion
RegisterNetEvent('qf_spawnselector_v2:playerSpawned', function(spawnId)
local src = source -- Server ID of the player who spawned
-- 'spawnId' matches the 'id' field of the selected location in Config.Spawns (or "last-location")
if spawnId == "last-location" then
print(("Player %s resumed from their last known coordinates."):format(src))
else
print(("Player %s chose to spawn at: %s"):format(src, spawnId))
end
-- Example: Set custom routing bucket or give clothing items based on spawn choice
SetPlayerRoutingBucket(src, 0)
if spawnId == "lspd_hq" then
-- Trigger job-uniform equip logic
end
end)Frequently Asked Questions (Q&A)
Last updated

