Updating Scripts
Code9 scripts don't update automatically. When a new version ships you need to re-download from the Cfx.re portal and replace the existing resource folder. The flow below is the safe way to do it without losing your config.
How you'll know a new version is out
- Announcements in the
#announcementschannel on our Discord. - Script-specific changelog posts in the product's dedicated Discord channel.
- The description tab on the product's Tebex page.
1. Re-download from the Cfx.re portal
Log into the Cfx.re portal with the same Cfx.re account you used for the purchase. Find the asset and download the latest build.
2. Back up your current resource
Before overwriting, copy the current resources/<script-name>/ folder somewhere safe. You'll want it for:
- Rolling back if the new version introduces a regression.
- Diffing your old
config.luaagainst the new one to see what keys you'd customized. - Preserving locale overrides or custom assets you added on top of the shipped files.
3. Replace the resource folder
Delete the old resources/<script-name>/ folder and drop the newly-extracted one in its place.
4. Migrate your config — don't overwrite
Open the new shared/config.lua and compare it against your backed-up old one. Copy over any values you'd previously customized (framework, inventory, locations, feature toggles, locale strings, etc.).
5. Database migrations (if any)
If the changelog mentions database changes, the update ships a migration SQL file. Import it into MySQL before restarting the resource.
6. Restart the resource
From the server console:
restart code9_mechanic
Watch the console output — any migration error or missing config key will surface in the first few seconds.
7. Test the obvious paths
After the restart, spend a minute on the features you use most — admin panel, item usage, UI open/close — to make sure nothing regressed on your specific server setup.
Need help with a specific migration?
Open a support ticket with:
- Old version and new version numbers.
- Your
config.lua(redact any API keys, webhook URLs, etc.). - The exact console error, if any.
- The steps you took to reproduce.
