
Spawn Selector
Installation
warning
We highly recommend you to read carefully each step written below.
Don't skip any step, it could lead to a non-functioning script.
Follow these steps to install the script
- Download the script from KeyMaster.
- Download the "Library" script from KeyMaster.
- Drag the
s1n_libfolder into yourresourcesdirectory. - Rename the
s1n_lib-....folder tos1n_lib. - Drag the
s1n_spawnselector-...folder into yourresourcesdirectory. - Rename the
s1n_spawnselector-....folder tos1n_spawnselector. - Start the library by adding
start s1n_libto yourserver.cfgfile. - Start the script by adding
start s1n_spawnselectorto yourserver.cfgfile. - Configure the script by modifying the values in the
config.luafile located in thes1n_spawnselectorscript folder. - Configure the library by modifying the values in all the files contained in the
configuration/folder located in thes1n_lib/script folder. - If you use QBCore, please follow the Adaptation to QBCore section.
Adaptation to ESX
No adaptation needed.
Adaptation to QBCore
Good to know : The script doesn't offer the possibility to select an appartment so it will use the default from the config file.
To make it work, please lead to qb-apartments/client/main.lua and look for "apartments:client:setupSpawnUI".
You need to make the adaptation of the function like this :
RegisterNetEvent('apartments:client:setupSpawnUI', function(cData)
QBCore.Functions.TriggerCallback('apartments:GetOwnedApartment', function(result)
if result then
TriggerEvent('s1n_spawnselector:openUI', true)
TriggerEvent("apartments:client:SetHomeBlip", result.type)
else
if Apartments.Starting then
TriggerEvent('qb-spawn:client:setupSpawns', cData, true, Apartments.Locations)
TriggerEvent('s1n_spawnselector:openUI', true)
else
TriggerEvent('s1n_spawnselector:openUI', true)
end
end
end, cData.citizenid)
end)