Spawn Select

Step-by-step installation guide, common issues & solutions, code snippets, error codes, config previews, locales previews, SQL previews, and changelogs; all in 1 easily accessible place.

Buy Here

FiveM Forums Post

YouTube Showcase Video

This resource can be purchased as part of a bundle for a discount here.

Translate

INSTALLATION GUIDE

Step 0 - First Steps

Step 1 - Fxmanifest

Step 2 - Configure Resource

Step 3 - SQL Database

Step 4 - Required Changes

There are no required changes you need to make. All you need to do is configure the config.lua correctly.

OPTIONAL FEATURES

This section is to help you understand how the built-in features of this resource work, and if applicable, how you can make them compatible with other resources. These features are not required, they are optional and can be configured in the [configs/config.lua].

Force Opening the UI

IF you want to open the spawn select UI for a player you can trigger the client event below. You can also send coordinates in the first argument; these coordinates will be used for the player's "Last Location". If the coordinates in the first argument are nil then the script will get the "Last Location" coordinates from the GetLastPosition function in the server_customise_me.lua.

TriggerEvent('cd_spawnselect:OpenUI')

INFORMATION

Chat Commands

These chat commands can be renamed and/or disabled in the Keys and Commands section of the [configs/config.lua].

The exact usage for each command will be displayed in the chat suggestions when using the commands in-game.

Command

Description

/personalspawn

The command to add/delete/show your personal spawn.

/openspawnselect

(Test Command) This is a test command to open the spawn select UI.

COMMON ISSUES

Please check out our Troubleshooting Guide before contacting our support.

🔔 Folder Name Make sure the folder name is cd_terminalhacker.

🔔 Encrypted Files Do not edit the encrypted files in any way.

🔔 Not Using ESX If you do not use ESX, please read Step 1 again carefully; you must use the Custom Framework option.

🔔 Coords need to be floats not integers Make sure the coords in the config.lua and mapdata.js have a decimal place at the end.

xPlayer Error?

eg., if you see this error: attempt to index a nil value (local 'xPlayer').

✔️ This means you are triggering the TriggerEvent('cd_spawnselect:OpenUI') event before ESX has fully cached and loaded your player data. Some servers take longer than others due to lower VPS specs, bad optimization, etc... so it takes the SQL queries longer to complete. If you use a multicharacter script, you can fix this by increasing the wait timer by a few seconds before triggering the event from your multiple character script.

SQL Default Value?

eg., if you see an error similar to this example when inserting an SQL query into your database - “BLOB/TEXT column 'personal_spawn' can't have a default value”.

✔️ You can use “VARCHAR(256)” instead of “LONGTEXT” in the SQL query.

SQL Unknown Column?

eg., if you see an SQL error in the server console similar to this example - ER_BAD_FIELD_ERROR: Unknown colum 'personal_spawn' in 'where clause'.

✔️ You are missing one of the required database columns. The SQL file can be found in the "READ_ME_AFTER_PURCHASING" folder.

Ped visible on first spawn?

eg., if you see your ped when first loading into the server before the character selection screen activates.

✔️ This should not happen, there should be a black screen, so means another script is conflicting. This is most likely caused by 1 line of code in es_extended or essentialmode or spawnmanager. Search for DoScreenFadeIn in the client-side of either of these resources and remove it then restart your server. (It could be in other resources too but these are the common ones).

ERROR CODES

If you see an error code not listed below, please open a script support ticket in the Codesign Discord.

N/A

CHANGELOG

Files Changed

Not every update requires you to replace the whole folder. We do this because we understand it's a pain to redo the configs for every update.

  • All Files - This means you should delete your old cd_spawnselect folder, download and add in the latest version, reconfigure the configs folder and restart your server.

  • All Files Except config.lua - This means you should do all of the above (in the All Files section) but additionally make a backup of the config.lua file and replace the new config.lua file with the one you made a backup of.

  • Specific Files - This means you can copy and paste the SPECIFIC new files over the old ones and restart the server.

Update Type

On rare occasions, you are forced to update to the latest version. Mostly due to authentication updates where the old versions will no longer work.

  • Mandatory - This means you MUST update to this new version, or the old versions will no longer work.

  • Optional - This means it's completely your choice whether you wish to update to the latest version. But we do not offer support for old versions for obvious reasons; they are old.

26/12/2020 - 19/10/2021

v3.0.0 - v3.1.2

Files Changed:

Update Type:

Changelog:

Edit

  • Minor code clean up.

  • Updated the codesign error handlers.

  • Changed the default police job spawn to MRPD.

  • Moved the framework code and chat commands to the client customise me to allow for further customization.

  • Rewrote a large majority of the code for optimisation and overall cleaned up the code.

  • The script is now drag-and-drop with esx, qbcore, vrp and no framework without having to make changes to external scripts.

Last updated

Was this helpful?