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_lib
folder into yourresources
directory. - Rename the
s1n_lib-....
folder tos1n_lib
. - Drag the
s1n_spawnselector-...
folder into yourresources
directory. - Rename the
s1n_spawnselector-....
folder tos1n_spawnselector
. - Start the library by adding
start s1n_lib
to yourserver.cfg
file. - Start the script by adding
start s1n_spawnselector
to yourserver.cfg
file. - Configure the script by modifying the values in the
config.lua
file located in thes1n_spawnselector
script 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)