F.A.Q
Setup
No. The script builds vehicles, it does not distribute the items, so it never conflicts with the shop, loot or crafting system already on the server. Pick a source before going live. The Developer page has ready snippets for a shop, a crafting recipe and a loot table.
For testing, the admin panel gives everything: open /vehiclecraft, pick a vehicle under Spawn for testing and press Chassis and Parts.
The item was handed out without metadata, so it does not know which vehicle to build. Use the admin panel or the commands:
1/vc_givechassis <playerId> emperor
2/vc_giveparts <playerId> emperorOr turn the whole mechanic off by switching to one item per vehicle:
1Config.ChassisMode = 'items'The GTA spawn name. It is also the key of the entry in the catalogue, so there is only one name to know. emperor, regina, elegy2, dominator4.
The script degrades on its own: parts become generic with no condition and no vehicle lock, and chassis mode falls back from 'metadata' to 'items'. Register the per-vehicle vc_chassis_<model> items from _INSTALL/items.lua and everything keeps working.
Building
Two independent settings. Config.Preset decides how many parts a build asks for, from two to nine. Config.PartTypes[type].count overrides a single part type, where 0 removes it entirely and 'auto' reads the number from the model.
1Config.Preset = 'simple'That is what Config.Parts.modelLock controls. On, an Elegy door only fits an Elegy. Off, any door fits any vehicle.
1Config.Parts = {
2 modelLock = false,
3}Part condition is on and the parts are arriving without a condition stamped, so they count as Config.Quality.defaultValue. Either stamp the condition wherever parts are handed out, or leave condition off, which is the shipped default.
1Config.Parts = {
2 quality = false,
3}Yes. Everyone within Config.Carcass.streamDistance spawns their own copy from the saved project data, with the same colour and the same parts already mounted. It is never a networked vehicle, so it costs no bandwidth and no other script can act on it.
It depends on Config.Collaboration. install and dismantle are gated separately, each accepting 'owner', 'crew' or 'public', and dismantle also accepts 'nobody', which welds the project shut for everyone including the owner. partsGoTo = 'owner' lets others undo work without gaining anything from it. claimByFinisher decides whether whoever presses Finish project keeps the vehicle.
Two limits refuse a placement. Config.Build.maxNearby caps how many projects can sit within crowdRadius metres of each other, and Config.Placement.zoneRestricted limits building to the listed zones. Both report the reason to the player.
They are deleted after Config.Build.staleDays days. Set it to 0 to keep them forever.
Salvage
Turn it on and list which models can be stripped:
1Config.Salvage = {
2 enabled = true,
3 models = { 'emperor2', 'tornado4' },
4}The option then appears on every vehicle in the world with one of those models.
No. The server refuses any vehicle whose plate belongs to an owned vehicle, and any vehicle with someone in the driver seat. The check runs through OpenServer.PlateExists, the same hook the plate generator uses, so a custom vehicle storage only has to be wired once.
The model list still deserves thought. A model players can buy makes their vehicle a target for the interaction prompt even though the strip is refused, and a model common in traffic makes parts effectively free, since traffic respawns and only Config.Salvage.cooldown limits how fast one player can work.
Admin
Anyone the Admin tier accepts: a framework admin, or the holder of one of the aces in Config.Permissions. Destructive actions, item spawning and paid grants each sit behind their own tier, and the buttons a rank cannot use are hidden from the panel.
By design. The Premium tier ships with useDefaultAdmins = false because it hands out things bought with real money. Give the account the ml_vehiclecraft.premiumadmin ace.
Yes, from the panel, with the Dangerous tier. The vehicle stays registered to its original owner. The same tier can force a single part on or off, and swap a project to a different vehicle keeping the parts already installed.
Monetization
Two things. A permanent unlock for a vehicle marked donorOnly, and uses, a per-player balance that pays for the paid actions. There is one balance and one use pays for any action. Uses live in the database, not in items, so they cannot be traded, duplicated, dropped or looted. The script never takes in-game money.
No. While Config.Premium.enabled is false the donorOnly flag is not enforced, so those vehicles are buildable by anyone holding their chassis. Turn the layer on to enforce it.
Yes. Uses and unlocks are stored against the character in the database, so a purchase made on the web store is waiting at the next login.
Updates
- Download the latest version from CFX Portal
- Back up
shared/config.lua,shared/data/vehicles.lua,server/config_server.luaand theopen/folder - Replace all files, then put the backed up ones back
- Restart the resource
Existing projects are read from the database and keep their saved slot counts, so a change to the part list only affects new projects.