Skip to main content
HousingDeprecated

Development

Add buildable objects, customize editor controls and register additional interiors.

Adding new objects

Setup overview

Integration notes

Object definitions

Add additional objects or props in source-files/shared/objects.json.

Preview images

Place images in source-files/nui/src/assets/props and name each file object_model.png.

Missing images

If a model does not have an image, the NUI loads the 404 placeholder SVG instead of crashing.

Modifying keybinds

Control keybinds are defined in source-files/shared/shared-config.ts.

Configuration

Editor controls

Configure the control keys used by the housing editor and property interactions.

CONTROLS: {
PLACE_PROP: 24, // Left click
PLACE_FLOOR: 24, // Left click
PLACE_WALL: 24, // Left click
ENTER_HOUSE: 38, // E
OPEN_BUY_MENU: 246, // Z OR Y (depends on keyboard)
LOCK_HOUSE: 311, // K
EXIT_HOUSE: 38, // E
WORLD_CURSOR: 244, // M
ROTATE: 45, // R
NUI_CURSOR_SWITCH: 22, // SPACE

DELETE_GRABBED_PROP: 214, // DEL
SAVE_GRABBED_PROP: 215, // ENTER
CANCEL_GRABBED_PROP: 202, // Escape or Backspace it depends.

PREVIOUS: 174, // Arrow left
NEXT: 175, // Arrow right
}

Adding additional interiors

Interiors are defined in source-files/shared/shared-config.ts. Always assign a unique object key to each interior.

Configuration

Interior configuration

Register additional interior positions under unique keys.

INTERIORS: {
'1': {
pos: { x: 151.446, y: -1007.765, z: -99 },
name: TSL.list.INTERIOR_1,
},
'2': {
pos: { x: 266.088, y: -1006.959, z: -100.895 },
name: TSL.list.INTERIOR_2,
},
'3': {
pos: { x: 346.747, y: -1012.522, z: -99.196 },
name: TSL.list.INTERIOR_3,
},
'4': {
pos: { x: -30.9122, y: -595.524, z: 80.03 },
name: TSL.list.INTERIOR_4,
},
'5': {
pos: { x: -17.54, y: -588.598, z: 90.114 },
name: TSL.list.INTERIOR_5,
},
'6': {
pos: { x: -174.21, y: 497.2907, z: 137.666 },
name: TSL.list.INTERIOR_6,
},
'7': {
pos: { x: 117.3731, y: 559.258, z: 184.304 },
name: TSL.list.INTERIOR_7,
},
'CUSTOM': {
pos: { x: 0, y: 0, z: 700 },
name: TSL.list.INTERIOR_CUSTOM,
},
}