Configuration Helps
SS-Weapons Setup & Configuration Guide
SS-Weapons is a RedM weapon catalogue, ammo, blueprint gunsmith, weapon condition, cleaning, repair, HUD and preview system.
This guide is written for server owners who want to install, configure and test the script safely.
Features Overview
Vintage catalogue store with configurable weapon and ammo lists per location.
Ammo boxes that add bullets to the player's ammo belt.
Blueprint gunsmith editor: every editable part linked to the real weapon on the bench, options drawer, live preview, rotate / zoom / reset.
Automatic centering and framing of the preview for every weapon; per-weapon presets tuned in game.
Per-weapon part lists (only what the game accepts), bow colours, blade materials and engravings.
Gunsmith templates for saving and reusing setups.
Custom weapon serial and custom weapon name, per store.
Persistent dirt, soot, degradation, damage and permanent wear; cleaning through the native inspection flow; repair kit.
One player per bench; nearby players can watch the preview.
Optional weapon HUD, poison / tranquilizer effects.
vorp_inventory v1 and v2, server-side validation of every purchase and edit.
8 languages.
Dependencies
Required
SS-Coreghmattimysqlvorp_inventory(v1 or v2, detected automatically)
Used By Default
@SS-Core/dataview.luavorp:NotifyLeftin the defaultNOTIFYfunction (config.lua).
Optional Integrations
SS-Notify, if you switch theNOTIFYfunction to the commented example.SS-PlayerShops, if you use the external player shop flow supported by the client.
Installation
1. Add The Resource
Keep the folder name exactly SS-Weapons: the script checks it and the NUI posts to it.
2. Database
Tables are created and upgraded automatically at start:
The script also reads and updates your existing weapon loadout table.
3. Start Order
4. vorp_inventory v2
v2 ships its own weapon degradation and component loading. To let SS-Weapons own them, set in the inventory config:
then set InventoryDegradationHandled = true in SS-Weapons. Leave InventoryVersion = "auto".
5. Restart
Restart the server and test one store, one bench, one ammo box, one cleaning item and one repair item.
Main Files
config.lua: Main configuration.cfg/weapons.lua/cfg/ammo.lua: Catalogs.cfg/anchors.lua: Callout line positions per weapon type.cfg/presets.json: Per-weapon camera and callout presets (saved by the server).l/l.lua: Notification translations.config.js: UI language and UI options.UI/: Catalogue and gunsmith UI.
Languages
Set the same language in two files:
Included: EN, IT, ES, FR, DE, PT, RU, RO.
Stores
Each store can enable the catalogue, the bench, or both:
What each store sells:
Custom serial / name per store:
Add A New Store
Copy an existing entry and change name, positions, cameras, blips and jobs:
Tips for the bench: ModifyPos is where the weapon lies, CamGunSmith looks straight down at it (pitch -90.0). Thanks to auto centering and auto fit you only need the camera roughly above the bench; the script centres and frames the weapon itself.
Weapon Catalog
cfg/weapons.lua controls per weapon: name / hash, label and title, description and extra text, category, price, gold value, buy jobs and grades, modify jobs and grades, type.
Empty tables mean everyone.
Ammo Catalog
cfg/ammo.lua fields: Item (inventory item), Label, Category, Price per box, Type (ammo type added to the belt), MaxAmmo (belt limit), Amount (bullets per box).
Buying Flow
Player opens a store: the catalogue shows weapons and ammo by category.
Player picks an item, optionally a custom serial / name or an ammo quantity.
One server call rebuilds the price from the config, checks money and carry space, charges and gives the item.
Ammo boxes are used later to add bullets to the belt.
Gunsmith Flow
Player equips a supported weapon and walks to a bench (job checked on client and server; the bench must be free).
The weapon is put away, the preview spawns on the bench and the camera glides above it. The preview is centred and framed automatically.
Cards for every editable part appear with a line to the part on the weapon. Click a card to open the options drawer; pick tiles, watch the preview update, see the price per change.
Templates can be saved / applied / deleted; the hammer button repairs the weapon.
Confirm & pay: the server prices the difference from what is stored, charges and saves the components. Re-equip the weapon to carry the new look.
Weapon Presets (camera + callouts per weapon)
If a weapon sits too small, off centre, or a callout points beside its part:
Set
Dev = true, equip the weapon and open a bench. The Weapon preset panel appears bottom-left.Camera: pan left / right, pan up / down, distance, turn and FOV move the camera; Weapon turn rotates the weapon on the bench; Reset cam drops the changes.
Anchor: pick a part and nudge it Right / Forward / Up until the ring sits on the right spot. Only moved parts are stored.
Save preset writes camera + moved anchors for this weapon to
cfg/presets.jsonand sends them to all clients. Delete preset removes them. Print table prints values and model diagnostics to F8.Ship
cfg/presets.jsonwith the resource and setDev = falseagain.
Gunsmith Prices
Prices per part category and edit type live in Config.GunSmith; payment type in WeaponEditPayment.Type (gold or money). See Configuration File for the full table.
Gunsmith Templates
Players save, apply and delete component setups. Stored in ss_weaponstemp by identifier, character ID, weapon and template name.
Weapon Cleaning
Use the clean item (or /w_inspect) with the weapon in hand: the native inspection opens, the clean prompt removes dirt / soot / degradation and adds a little permanent wear. /w_inspectstatus prints why inspection is blocked, /w_inspectreset frees a stuck interaction.
Weapon Repair
Repair is started from the editor and lowers the permanent wear stored on the server.
Weapon Wear
ss_weapons stores per serial: weapon name, last loadout ID, dirt, soot, condition, damage and permanent wear. Wear sent by clients can only grow; only cleaning and repair lower it. With UseDegradation = true a weapon at 100% permanent wear cannot fire.
Weapon HUD
Icons: UI/img/weapons (lower-case weapon name) and UI/img/ammo_types.
Preview Sync & Bench Lock
Nearby players see the preview while someone edits. A bench in use is locked: others get "This workbench is being used by someone else" until the player leaves, pays or disconnects.
Poison & Tranquilizer
Disabled by default; enable only if your server uses poison arrows or tranquilizer gameplay.
Dev Commands & Tools
With Dev = true: /dirtyweapon, /wstatus, /wdirt, /wsoot, /wdegradation, /wdamage, /wthreshold, /wwear, /wresetwear, the Weapon preset panel, and [SS-Weapons][Equip] / [SS-Weapons][Anchors] prints in F8.
Always available: /w_inspect, /w_inspectstatus, /w_inspectreset.
Troubleshooting
Store Prompt Does Not Appear
EnableStore = true,CatalogWeaponcoordinates,PressKey, folder namedSS-Weapons.
Bench Prompt Does Not Appear
EnableGunsmith = true,ModifyWeaponscoordinates, player job inJobs.
"Re-equip the weapon"
Equip the weapon once from the inventory so the script receives it. Weapons received at character select are dressed when drawn. On v2, draw the weapon you want to edit before pressing the prompt.
"This workbench is being used by someone else"
Another player has the bench open. Locks are released on leave / pay / disconnect and expire on their own.
Wrong Weapon On The Bench / Mods Not Applied (vorp_inventory v2)
Make sure the server runs the current
c/c.luaands/s.lua,InventoryVersion = "auto", and v2 hasUSE_WEAPON_DEGRADATION = falseandUSE_WEAPON_COMPONENTS = false.
Callout Lines In The Wrong Place
Tune the weapon in the Dev preset panel and Save preset; check
SideSign/MuzzleAtPositiveEndincfg/anchors.luaif a whole weapon type is mirrored.
Player Cannot Buy
Money, carry limits from
SS-Core, item exists incfg/weapons.lua/cfg/ammo.lua, player stands at the counter, custom name withinMinLabel/MaxLabel.
Ammo Item Does Not Add Bullets
Ammo item name matches the inventory item,
Typeis correct, belt not full,MaxAmmo/Amountcorrect.
Weapon HUD Image Is Missing
Image exists in
UI/img/weaponswith the lower-case weapon name; ammo icon exists inUI/img/ammo_types.
Cleaning Does Not Work
Player has
CleanWeaponItem, weapon in hand, run/w_inspectstatusfor the exact blocker.
Repair Does Not Work
WeaponRepair.Enabled = true, player has the repair item, weapon has at leastMinRustRequiredpermanent wear.
Recommended Live Checklist
ghmattimysql,vorp_inventory,SS-Corestart beforeSS-Weapons.Resource folder named
SS-Weapons.Dev = false.Same language in
config.luaandconfig.js.cfg/presets.jsonshipped.Stores, benches, buying, ammo, edit / pay, templates, cleaning, repair, HUD and preview sync tested.
Editing Rules For Beginners
Strings use quotes:
"text". Table entries end with a comma.trueenables a feature;falsedisables it or means all / everyone depending on the field.Numbers do not use quotes. Coordinates use
{x, y, z}or{x, y, z, heading}.Do not rename the resource folder.
Bad: Dev = "false" — Good: Dev = false
Last updated