STG ScriptsDocumentation
Map Editor

Configuration

Every option in STG Map Editor shared/config.lua, from access groups and the opening key to prop categories, card images and custom props.

All settings live in stg-mapeditor/shared/config.lua. The file stays editable in the escrow version. Restart the resource after a change.

Language

Config.Language = 'en'

Available: en, de, fr, es, pt, it, nl, pl, sv, no, fi, cs, ar, he, jp, ko, zh. To change a text, edit the matching file in stg-mapeditor/locales/.

Access

Config.AllowedGroups = { 'god', 'admin' }

Framework permission groups that can open the editor. The same groups are checked on the server for every save, delete and restore, so nobody outside them can change the map.

Prop

Type

Opening the editor

Config.Command = 'mapeditor'
Config.Key = {
    Active = false,
    Key = 'F7',
}

Prop

Type

You can also open it from another script:

exports['stg-mapeditor']:openEditor()          -- client
exports['stg-mapeditor']:openEditor(source)    -- server, checks the access groups first

Prop categories

Each entry in Config.Categories is one button in the top bar of the editor:

Config.Categories = {
    {
        name = 'furniture',
        label = 'Furniture',
        props = {
            { model = 'prop_table_06', label = 'Table' },
            -- ...
        },
    },
    -- ...
}

Prop

Type

The script ships with 9 categories: furniture, nature, beach, light, food, building, stunt, parkour and street.

Icons and card images

FileUsed for
web/assets/img/categories/<name>.svgCategory button icon. Without it the default icon is shown.
web/assets/props/<name>/<model>.webp or .pngCard image for a prop. Without it a placeholder is shown.
web/data/images.jsonList of the card images the editor knows about. Add new images to it.

The GTA catalogue

About 13,700 more GTA props are loaded from web/data/objects.json and added to the category with the same name. Props that fit no category are listed under Other. If you remove a category from the config, its catalogue props move to Other as well.

Any model can also be spawned by typing its exact name in the search and pressing Enter.

Custom props

The + card at the start of every category opens a small window:

  • Model name: the model to add, including your own streamed props.
  • Spawn now: spawn it in front of the camera right away.
  • Save to category: save it to a category with your own label. Saved props show up for every admin and stay after a restart. Up to 1,000 can be saved.

HUD

While the editor is open, stg-hud and the vehicle HUD of qbx_hud are hidden automatically. For any other HUD, listen to this client event:

AddEventHandler('stg-mapeditor:client:toggled', function(open)
    -- open is true when the editor opens and false when it closes
end)

Still having trouble?

Open a ticket on our Discord. Our team answers around 15 hours a day.

Get help on Discord

On this page