Creating Interior
All the interiors are defined in a file using key-value pairs. The key represents the name of the interior, and the value is a table containing the options for that interior. Later, the key from that table will be used in the garage to determine which interior the garage will use.
Interior options: table
interiorId:
numberId of interior, you can use native GetInteriorAtCoords or CodeWalker to find it
ipl?:
stringOptional, some interiors doesn't have it
insideSpawn:
vector4Location where player will be spawned inside interior
customizationMenu?:
vector3Optional, if your interior doesn't have options to customize, you dont put this
Vehicles:
tableThe
Vehiclestable consists of numbered sub-tables, where each number represents a specific floor. Inside each floor, there are multiple sets of coordinates (vector4) where vehicles will spawn
Vehicles = { [1] = { -- This represents floor 1 vec4(0, 0, 0, 0), vec4(0, 0, 0, 0), }, [2] = { -- This represents floor 2 vec4(0, 0, 0, 0), } }Customization?:
tableThe
Defaulttable defines the initial settings that are applied when a garage is purchasedEach number (
[1],[2], etc.) represents a floor (similar to theVehiclestable).Each entry inside a floor is a configuration setting.
Each setting must have:
name: string– A name of entity set.type: string– Specifies the category of the setting (e.g., tint, blinds), naming doesn't matter.color: number(Optional) – Only included if applicable.
Default = { [1] = { { name = 'entity_set_shell_01', type = 'interior' }, { name = 'entity_set_shell_02' }, -- static, wont change { name = 'entity_set_shell_03', type = 'tint', color = 1 }, } },
Purchasable:
tableEach item belongs to a category, and the category name (key) will be displayed as a title in the menu.
Every item in the table must contain:
label– The name of the item that will be shown in the menu.name– The internal name (entity set) used by the script to apply changes.price– The cost of the item.type– The type of the item (e.g.,interior,tint, etc.).color(optional) – A numerical value representing the item's color (if applicable)
DeactivateInterior?:
functionFunction that will unload interior
LoadDefaults?:
functionFunction that will load interior for preview, make sure that
Defaulttable have same logic as this because when you purchase garage it will set data fromDefaulttable
You can check some predefined interiors in config/interior.lua
Last updated