GR1M Docs

Placer

The standard placement tool for GR1M resources. It saves nothing: the calling resource stores each point and re-checks it on the server.

v2.0.0Needs ox_lib

Two styles, picked per player:

local res = exports.GR1M_Placer:Start({
    title = 'Kivo Dispensary', kind = 'bench', kindLabel = 'Packaging bench',
    model = 'prop_table_01', -- false = marker only, set footprint = { w, d }
    once = false, used = 2, max = 8,
    bounds = { poly = { { x = 0.0, y = 0.0 } }, minZ = 20.0, maxZ = 26.0 }, -- optional
    points = { { id = 1, kind = 'bench', label = 'Bench 1', x = 0.0, y = 0.0, z = 0.0, heading = 90.0, model = 'prop_table_01' } },
}, {
    stamp = function(coords, heading, model) return { ok = true, pointId = 3, used = 3 } end,
    undo = function(pointId) return { ok = true, used = 2 } end,                -- optional
    move = function(pointId, t) return { ok = true } end,                       -- optional: t = { x, y, z, heading, w, d }
    remove = function(pointId) return { ok = true, used = 1 } end,              -- optional
})

Start blocks until the session ends and returns { ok, placed, error }. Coordinates are the prop's origin, or the surface for marker-only sessions and areas. Full option list: top of client/main.lua.

#Areas

mode = 'area' draws boxes instead of props (e.g. a grill top inside an MLO). Builder: click and drag on a surface. Hold: the box floats in front, Shift+Scroll width, Ctrl+Scroll depth. Options minSize, maxSize, slots (spreads that many spots across the box). hooks.stamp(area) gets { x, y, z, heading, w, d, spots }.

exports.GR1M_Placer:StartArea(opts) is the one-shot form and returns { ok, x, y, z, heading, w, d, spots } or { ok = false, error = 'cancelled' }.

#Other exports

IsActive(), Stop(), GetAim() (this frame's { x, y, z, heading, state } or nil, for drawing extra guides during a session).

#Builder keys

WASD fly, Space / C up and down, Shift fast, right mouse drag look, click drop or select, Shift+Click add to selection, Scroll or Q / Z rotate, arrows nudge, PgUp / PgDn height, 1 2 3 precision, G snap, L world or own axes, F focus, E place, Ctrl+D copy, Del delete, Ctrl+Z / Ctrl+Y undo and redo, Esc back out (draft, then selection, then done).