ktoxktox docs
ktx_garages

Builder

Building a garage in game, from the command to the saved definition.

Garages are built in game. Nothing is written into a config file, and the definition ends up in ktx_garages_builder.

The command

/garages

Who may run it comes from Config.Builder.allow. Aces and groups both work and one match is enough:

Config.Builder = {
    enabled = true,
    command = "garages",
    allow = { "ktx_garages.builder", "admin", "superadmin" },
}

An empty list opens the builder for everybody, which is only ever right on a development server.

The four stages

The sidebar walks through them in order. Every row carries a status dot, so what is still missing is visible without going back.

Setup

Name, price, resale percentage and friendly fire. The blip and its sprite, colour and text. Access rules for vehicles. Whether this is a job garage, and which vehicles employees may park.

Nothing here holds you back. Every stage is clickable at any time and the button at the bottom is never greyed out. What is missing is caught at the save, and that wants seven things: a name, a price, the main entry, the main exit, the showcase camera, the interior spawn and at least one slot. Save without one of them and the builder names what it is still waiting for.

A price of 0 is a normal price, see Ownership.

World

The points outside: main entry, main exit and the showcase camera. Foot entry, foot exit and the invite zone are optional and can stay empty.

Each point is captured either from where you stand or from a free camera. While placing, the mouse wheel turns the heading, and the marker in the world turns with it.

Interior

Pick the interior, then place the interior spawn, the manage marker and the parking slots. Up to 150 slots per garage.

If you have already built a garage in the same interior, it shows up as a template. It hands over what is inside and nothing else: the slots, the interior spawn and the manage marker. Price, blip, access rules and the points outside stay as you left them.

Changing the interior after placing slots clears the placements inside. The points outside stay.

Review

Every part with its status, and the save. Closing the builder with unsaved changes asks first.

The library

The tools menu also lists every saved garage. From there a garage can be opened again to change a single point, or deleted. Deleting removes the definition, not the vehicles.

Your own interiors

Config.Interiors is the list the builder offers. Each entry needs an id, a name, a short name, a category and a position:

{ id = "imp_dt1_02_cargarage", name = "Arcadius Business Center",
  shortName = "Arcadius", category = "CEO Garages",
  position = vector3(-191.0133, -579.1428, 135.0) },

The id is the interior's own name in the game. The position is a point inside it, which is where the builder puts you.