Configuration
This showcases and explains the config.lua file within the Housing Script!
Config = {}
-- ============================================
-- BASIC SETTINGS
-- ============================================
Config.Debug = false -- Set to false in production for better performance
-- ============================================
-- AUTO-DETECTION (Everything is auto-detect)
-- ============================================
-- All systems auto-detect from custom folders
-- Framework, Inventory, Banking, Garage, Clothes will be detected automatically
-- You don't need to set these - they auto-detect from your installed resources
-- ============================================
-- FRAMEWORK
-- ============================================
-- Will auto-detect: esx, qbcore, qbox, ox_core
-- Framework files are in: client/frameworks/ and server/frameworks/
-- Auto-detect framework
Config.Framework = Config.Framework or 'auto'
if Config.Framework == 'auto' then
if GetResourceState('qbx_core'):find('start') then
Config.Framework = 'qbox'
elseif GetResourceState('qb-core'):find('start') then
Config.Framework = 'qbcore'
elseif GetResourceState('es_extended'):find('start') then
Config.Framework = 'esx'
elseif GetResourceState('ox_core'):find('start') then
Config.Framework = 'ox_core'
else
Config.Framework = 'esx' -- Default to ESX if nothing detected
end
if Config.Debug then
print('[Simple Properties] Auto-detected framework: ' .. Config.Framework)
end
end
-- ============================================
-- PROPERTY SETTINGS
-- ============================================
Config.Property = {
-- Shell Configuration
ShellZLevel = 2000.0,
ShellUseRoutingBuckets = true,
-- Default Inventory
DefaultSlots = 50,
DefaultWeight = 10000,
-- Interaction
InteractionDistance = 1.5,
InteractionRadius = 1.5,
-- Lockpick
EnableLockpick = true,
LockpickDifficulty = { 'easy', 'easy', 'medium', 'hard' },
-- Doorbell
EnableDoorbell = true,
DoorbellSound = 'house-doorbell',
DoorbellAudioBank = 'audiodirectory/properties_sounds',
}
-- ============================================
-- POLICE SYSTEMS
-- ============================================
Config.PoliceRaid = {
Enabled = true,
Jobs = {
["police"] = 0, -- Job name = minimum grade
["sheriff"] = 1,
},
}
Config.PoliceLockdown = {
DisableEnter = true,
DisableInventory = true,
DisableGarage = true,
DisableKeyManagement = true,
DisableInteractablePoints = true,
DisableDoorManagement = true,
DisableSellProperty = true,
DisableFurniture = true,
DisableIplManagement = true,
}
-- ============================================
-- PROPERTY CREATION
-- ============================================
Config.Creation = {
Command = 'createproperty',
RequireJob = true,
RequireAdmin = false,
}
-- ============================================
-- REAL ESTATE & ADMIN
-- ============================================
Config.RealEstateJob = {
Enabled = true,
JobName = 'police',
MinGrade = 0,
}
Config.AdminGroups = {
Enabled = true,
Groups = { 'admin', 'superadmin' },
}
-- ============================================
-- STARTER APARTMENT
-- ============================================
Config.StarterApartment = {
Enabled = true,
DisableForceSale = true,
DisableSell = true,
DisableRent = true,
DisableInactivity = true,
BuildingId = 1,
Address = "Los Santos",
Name = "Starter Apartment",
UniqueName = true,
RentedInstead = true,
InitialRentDays = 7,
FutureRentPrice = 500,
Interior = {
type = "shell",
name = "Container",
},
Inventory = {
slots = 10,
weight = 10000,
},
InteractablePoints = {
["OpenInventory"] = true,
["ClothingMenu"] = true,
}
}
-- ============================================
-- IPL & MLO
-- ============================================
Config.IPL = {
Enabled = true,
Price = { 1, 1000000 },
PaidIplChanges = true,
DistanceToCheck = 50.0,
UseRoutingBuckets = false,
}
Config.MLO = {
Enabled = true,
PriceBasedOnArea = true,
InventoryOnCreation = true,
InventoryData = {
Slots = { 1, 100 },
Weight = { 1, 1000000 },
},
PricePerSquare = { 1, 200 },
Price = { 1, 1000000 },
DistanceToCheck = 50.0,
}
-- ============================================
-- BLIPS
-- ============================================
Config.Blips = {
Enabled = true,
ForSale = {
Enabled = true,
Sprite = 374,
Color = 69,
Scale = 0.8,
},
Owned = {
Enabled = true,
Sprite = 40,
Color = 3,
Scale = 0.8,
},
Keyholder = {
Enabled = true,
Sprite = 40,
Color = 9,
Scale = 0.8,
},
}
-- ============================================
-- INTERACTABLE POINTS
-- ============================================
Config.InteractablePoints = {
Stash = {
Enabled = true,
DefaultSlots = 50,
DefaultWeight = 10000,
KeyholderAccess = true,
EveryoneInsideAccess = false,
},
Wardrobe = {
Enabled = true,
KeyholderAccess = true,
EveryoneInsideAccess = false,
},
}
-- ============================================
-- SHELL PACKS
-- ============================================
Config.Shells = {
K4mb1StarterShells = true, -- [FREE] K4MB1 Starter Shells
EnviShells = false, -- [FREE] Envi Starter Shells
AllShellsBundle = false, -- [PAID] K4MB1 All Shells Bundle
AllShellsBundle2 = false, -- [PAID] K4MB1 All Shells Bundle 2
JamaringV1 = false, -- [PAID] Jamaring V1
JamaringV2 = false, -- [PAID] Jamaring V2
JamaringV3 = false, -- [PAID] Jamaring V3
JamaringV4 = false, -- [PAID] Jamaring V4
JamaringV5 = false, -- [PAID] Jamaring V5
MaxCreations = false, -- [PAID] Max Creations
FuryV1 = false, -- [PAID] Fury V1
FuryV2 = false, -- [PAID] Fury V2
DCCustomz = false, -- [PAID] DC Customz
}
-- ============================================
-- LOGGING
-- ============================================
Config.Logs = "discord" -- "discord" or "ox_lib"
Config.DiscordWebhooks = {
General = GetConvar("propertiesDiscordWebhook", "SET_YOUR_WEBHOOK_IN_SERVER.CFG"),
Property = GetConvar("propertiesPropertyWebhook", GetConvar("propertiesDiscordWebhook", "SET_YOUR_WEBHOOK_IN_SERVER.CFG")),
Building = GetConvar("propertiesBuildingWebhook", GetConvar("propertiesDiscordWebhook", "SET_YOUR_WEBHOOK_IN_SERVER.CFG")),
Keyholder = GetConvar("propertiesKeyholderWebhook", GetConvar("propertiesDiscordWebhook", "SET_YOUR_WEBHOOK_IN_SERVER.CFG")),
Door = GetConvar("propertiesDoorWebhook", GetConvar("propertiesDiscordWebhook", "SET_YOUR_WEBHOOK_IN_SERVER.CFG")),
Raid = GetConvar("propertiesRaidWebhook", GetConvar("propertiesDiscordWebhook", "SET_YOUR_WEBHOOK_IN_SERVER.CFG")),
Transaction = GetConvar("propertiesTransactionWebhook", GetConvar("propertiesDiscordWebhook", "SET_YOUR_WEBHOOK_IN_SERVER.CFG")),
}
-- ============================================
-- POLICE RAID FUNCTION
-- ============================================
Config.RaidProperty = function()
local result = false
local success = lib.skillCheck({ 'easy', 'easy' }, { 'w', 'a', 's', 'd' })
if success then
success = lib.progressCircle({
duration = math.random(10000, 20000),
label = 'Breaching the door..',
disable = {
car = true,
combat = true,
move = true
},
anim = {
dict = "missheistfbi3b_ig7",
clip = 'lift_fibagent_loop'
}
})
if success then
result = true
end
end
return result
end
-- ============================================
-- AUTO-DETECTION CODE
-- ============================================
-- Framework Auto-Detection
CreateThread(function()
if GetResourceState('qbx_core'):find('start') then
Config.Framework = 'qbox'
elseif GetResourceState('qb-core'):find('start') then
Config.Framework = 'qbcore'
elseif GetResourceState('es_extended'):find('start') then
Config.Framework = 'esx'
elseif GetResourceState('ox_core'):find('start') then
Config.Framework = 'ox_core'
else
Config.Framework = 'standalone'
end
if Config.Debug then
print('[Simple Properties] Detected Framework:', Config.Framework)
end
end)
-- Inventory Auto-Detection (from custom/inventory/)
CreateThread(function()
local inventories = {
'ox_inventory',
'qb-inventory',
'core_inventory',
'mf-inventory',
'qs-inventory',
'inventory',
'tgiann-inventory',
'chezza_inventory',
'codem-inventory',
}
for i = 1, #inventories do
if GetResourceState(inventories[i]):find('start') then
Config.Inventory = inventories[i]
break
end
end
if Config.Debug and Config.Inventory then
print('[Simple Properties] Detected Inventory:', Config.Inventory)
end
end)
-- Garage Auto-Detection (from custom/garages/)
CreateThread(function()
local garages = {
'nolag_garages',
'cd_garage',
'qb-garages',
'jg-advancedgarages',
'qbx_garages',
'loaf_garage',
'okokGarage',
'rcore_garage',
'zerio-garage',
'rx_garages',
'vms_garagesv2',
}
for i = 1, #garages do
if GetResourceState(garages[i]):find('start') then
Config.Garage = garages[i]
break
end
end
if Config.Debug and Config.Garage then
print('[Simple Properties] Detected Garage:', Config.Garage)
end
end)
-- Banking Auto-Detection (from custom/banking/)
CreateThread(function()
local bankings = {
'tgg-banking',
'Renewed-Banking',
'snipe-banking',
'okokBanking',
'fd_banking',
'LGMods_Banking',
'qb-banking',
'qb-management',
'esx_addonaccount',
}
for i = 1, #bankings do
if GetResourceState(bankings[i]):find('start') then
if bankings[i] == 'qb-banking' then
local version = GetResourceMetadata('qb-banking', 'version', 0) or '0'
if tonumber(string.sub(version, 1, 3)) < 2 then
goto skip
end
end
Config.Banking = bankings[i]
break
end
::skip::
end
if Config.Debug and Config.Banking then
print('[Simple Properties] Detected Banking:', Config.Banking)
end
end)
-- Clothes Auto-Detection (from custom/clothes/)
CreateThread(function()
local clothes = {
'illenium-appearance',
'qb-clothing',
'fivem-appearance',
'rcore_clothes',
'vms_clothestore',
'17mov_CharacterSystem',
'crm-appearance',
'bl_appearance',
'codem-appearance',
}
for i = 1, #clothes do
if GetResourceState(clothes[i]):find('start') then
Config.Clothes = clothes[i]
break
end
end
if Config.Debug and Config.Clothes then
print('[Simple Properties] Detected Clothes:', Config.Clothes)
end
end)
Last updated
