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

Translate

INSTALLATION GUIDE

1. Unzip the cd_devtools.zip folder and place this folder in your servers resource folder.
2. Before starting the script, please read the config.lua (this is located inside the main cd_devtools folder) and configure the script to suit your server's needs.
3. Add the resource to your server start config: ensure cd_devtools. The name of the folder must not be changed or the resource will not function correctly.

Step 1 - Table Viewer

Simply trigger the event below, sending a LUA table in the first argument. The UI will only open when you trigger the event. This event can be placed in while loops and the displayed table will be updated.
Notes
  • You can disable the NUI focus by clicking middle mouse button while the UI is still open, and the UI will stay on your screen even while you are triggering the event so you can see the table being updated live.
  • You can reopen the UI and display the last table by pressing numpad enter while the UI is closed.
  • Yes it will be high ms on resmon when bring triggered from a loop but this is a developer resource for dev servers only.
From server to client
From client to client
1
TriggerClientEvent('table', source, TABLE_HERE)
Copied!
1
TriggerEvent('table', TABLE_HERE)
Copied!

Step 2 - Quick Resource Restart

The purpose of this feature is to be able to quickly restart scripts when developing and debugging. To save a script to restart you can use the chat command below to save your chosen script.
Use the chat command /restart_script "resource_name" to save the name of your chosen resource in the restart_script.txt file and cache it in the server side. Now when you start your server or restart the resource you can simply press the (numpad +) key to restart the resource.

Chat commands

Command
Example
Description
/restart_script
/restart_script cd_garage
Save the name of a resource to use in the quick restart keypress. The example command will save the resource "cd_garage".

Default Key Binds

Key
Description
Middle Mouse Button
While the UI is opened, this will toggle the NUI focus (mouse on screen).
Escape
Close the UI.
NUMPAD +
Quickly restart your chosen script.
Numpad Enter
Reopen the UI and display the last table.

SCRIPT NOT WORKING?

Common Issues

🔔 Folder Name Make sure the name of the folder is cd_devtools.

Troubleshooting

1. Check for obvious error prints in the server console and the client F8 console. If you don't see any obvious errors make sure to restart the script while the server is live and check again.
2. If none of the above worked, have a second read through the installation guide above, you may have missed something - you are only human.
If all else fails, contact the Codesign Team in the Codesign Discord.

CONFIGS & LOCALES

Config
1
Config = {}
2
Config.Keys={['ESC']=322,['F1']=288,['F2']=289,['F3']=170,['F5']=166,['F6']=167,['F7']=168,['F8']=169,['F9']=56,['F10']=57,['~']=243,['1']=157,['2']=158,['3']=160,['4']=164,['5']=165,['6']=159,['7']=161,['8']=162,['9']=163,['-']=84,['=']=83,['BACKSPACE']=177,['TAB']=37,['Q']=44,['W']=32,['E']=38,['R']=45,['T']=245,['Y']=246,['U']=303,['P']=199,['[']=39,[']']=40,['ENTER']=18,['CAPS']=137,['A']=34,['S']=8,['D']=9,['F']=23,['G']=47,['H']=74,['K']=311,['L']=182,['LEFTSHIFT']=21,['Z']=20,['X']=73,['C']=26,['V']=0,['B']=29,['N']=249,['M']=244,[',']=82,['.']=81,['LEFTCTRL']=36,['LEFTALT']=19,['SPACE']=22,['RIGHTCTRL']=70,['HOME']=213,['PAGEUP']=10,['PAGEDOWN']=11,['DELETE']=178,['LEFTARROW']=174,['RIGHTARROW']=175,['TOP']=27,['DOWNARROW']=173,['NENTER']=201,['N4']=108,['N5']=60,['N6']=107,['N+']=96,['N-']=97,['N7']=117,['N8']=61,['N9']=118,['UPARROW']=172,['INSERT']=121,['MMB']=27}
3
4
Config.Keys = {
5
open_ui = Config.Keys['NENTER'], --(numpad enter)
6
7
toggle_nuifocus = Config.Keys['MMB'], --(middle mouse button)
8
9
restart_script = Config.Keys['N+'], --(numpad +)
10
}
Copied!

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_devtools folder, download and add in the latest version, reconfigure the configs folder and restart your server.
  • Specific Files - This means you can simply copy and paste the SPECIFIC new files over the old ones and restart the server.
v1.0.0
v1.0.1
v1.0.2

11/07/2021

Files Changed:
  • All files
  • Specific Files
Update Type:
  • Mandatory
  • Optional
Changelog:
STATUS
  • Development Stage: COMPLETE
  • Alpha Test Stage: COMPLETE
  • Beta Test Stage: COMPLETE

14/07/2021

Files Changed:
  • All files
  • Specific Files
Update Type:
  • Mandatory
  • Optional
Changelog:
Add
  • Added version check
Edit
  • Minor code clean-up
  • Enable NUI focus be default when opening the table viewer UI
  • Shortened the event to open the table viewer UI for quality of life
Fix
  • Fix for the UI not opening after you closed it when the previous table is the same as the current one

19/12/2021

Files Changed:
  • All files
  • Specific Files
Update Type:
  • Mandatory
  • Optional
Changelog:
Add
  • Added a small quality of life feature - the ability to reopen the UI and view the last table after it has been closed.